From 51e43a624a955a02e810d214d9adaa2275e083f8 Mon Sep 17 00:00:00 2001 From: Suha Can Date: Wed, 8 Jun 2011 14:27:05 -0700 Subject: [PATCH] Exception handling in controllers. No more YSOD. Create custom 500 error page (with admin theme) for all technical errors (i.e. exceptions that the app doesn't handle) Implement an filter that will catch all unhandled exceptions and display the custom 500 page. Filter will also use ILogger to log the exception. --HG-- branch : 1.x extra : transplant_source : %F5P%0E%3EXv%A0%A3%85%DAu7%9Et%FB2l%86%FC%A3 --- src/Orchard.Web/Core/Orchard.Core.csproj | 3 + .../Core/Shapes/Views/ErrorPage.cshtml | 8 +++ .../Filters/UnhandledExceptionFilter.cs | 57 +++++++++++++++++++ src/Orchard/Mvc/ShapeResult.cs | 2 +- src/Orchard/Orchard.Framework.csproj | 2 + 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 src/Orchard.Web/Core/Shapes/Views/ErrorPage.cshtml create mode 100644 src/Orchard/Exceptions/Filters/UnhandledExceptionFilter.cs diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 0abe6ec2f..5b6b16cdf 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -482,6 +482,9 @@ + + +