カスタム エラー ハンドルに関する記事をフォローしようとしています。コントローラー、ビュー、およびグローバル ファイルをセットアップしました。Error/HttpError に移動すると、自分のページが表示されます。しかし、コントローラーの 1 つの内部で新しい例外をスローしようとすると、エラー コードのいずれもトリガーまたはリダイレクトされず、アプリケーション on_error も起動しません。
それは私にこれを与えるだけです:
Error handler test
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ApplicationException: Error handler test
Source Error:
Line 275: public ActionResult Website(RerModel model) {
Line 276:
Line 277: throw new ApplicationException("Error handler test");
Line 278:
Line 279: var step = "Website";
私は何かが欠けている必要がありますか?