Ziks.WebServer/Controller.cs
/// <summary>
/// Called when an unhandled <see cref="ControllerActionException"/> is thrown.
///
/// The default implementation will write a simple HTML response describing the error.
/// </summary>
/// <param name="e">The exception that was thrown.</param>
Called when an unhandled  is thrown.

The default implementation will write a simple HTML response describing the error.
Called when an unhandled is thrown . The default implementation will write a simple HTML response describing the error .
protected virtual void OnUnhandledException( ControllerActionException e )
        {
            Response.StatusCode = (int) e.StatusCode;
            var title = $"{(int) e.StatusCode}: {e.StatusCode}";
            OnServiceHtml( new html
            {
                new head
                {
                    new title {title}
                },
                new body
                {
                    new h2 {title},
                    "Request:", nbsp, new code {Request.Url.ToString()}, br,
                    "Message:", nbsp, new code {e.Message}, br,
                    If( (int) e.StatusCode >= 500 && (int) e.StatusCode < 600 && e.InnerException != null,
                        new code (style=> "padding:8px;white-space:pre-wrap;display:block;") { e.ToString() }
                    )
                }
            } );
        }
protected virtual void OnUnhandledException ( ControllerActionException e ) { Response . StatusCode = ( int ) e . StatusCode ; var title = $" { ( int ) e . StatusCode } :  { e . StatusCode } " ; OnServiceHtml ( new html { new head { new title { title } } , new body { new h2 { title } , " " , nbsp , new code { Request . Url . ToString ( ) } , br , " " , nbsp , new code { e . Message } , br , If ( ( int ) e . StatusCode >= 500 && ( int ) e . StatusCode < 600 && e . InnerException != null , new code ( style => " " ) { e . ToString ( ) } ) } } ) ; }
Called when an unhandled  is thrown.
Called when an unhandled is thrown .
e
ControllerActionException
The exception that was thrown.
The exception that was thrown .