Custom Error Handling
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18051
|
||||
// Runtime Version:4.0.30319.34003
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -43,26 +43,93 @@ namespace Disco.Web.Views.Shared
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 3 "..\..\Views\Shared\Error.cshtml"
|
||||
#line 2 "..\..\Views\Shared\Error.cshtml"
|
||||
|
||||
ViewBag.Title = "Error";
|
||||
ViewBag.Title = "Server Error";
|
||||
|
||||
var ex = Model.Exception;
|
||||
|
||||
|
||||
while (ex != null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n<hgroup");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"title\"");
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(">\r\n <h1");
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">\r\n <h2");
|
||||
|
||||
WriteLiteral(">Error.</h1>\r\n <h2");
|
||||
WriteLiteral(" style=\"white-space: pre;\"");
|
||||
|
||||
WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
WriteLiteral(">An error occurred while processing your request.</h2>\r\n</hgroup>\r\n");
|
||||
|
||||
#line 12 "..\..\Views\Shared\Error.cshtml"
|
||||
Write(ex.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h2>\r\n <table");
|
||||
|
||||
WriteLiteral(" style=\"background-color: #fff;\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 40px;\"");
|
||||
|
||||
WriteLiteral(">Type:</th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Shared\Error.cshtml"
|
||||
Write(ex.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">Stack:\r\n </th>\r\n <td>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 560px; white-space: pre; overflow: auto;\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Shared\Error.cshtml"
|
||||
Write(ex.StackTrace);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Shared\Error.cshtml"
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
<script>
|
||||
$(function () {
|
||||
$('#layout_PageHeading').css({ 'background': '#C80000', 'color': '#fff' });
|
||||
$('#layout_Page').css({ 'background': 'linear-gradient(to top, #F2B0B0, #C80000 200px)' }).find('h2').css({ 'color': '#fff' });
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user