using System; namespace EmbedIO { partial class WebServerExtensions { /// /// Sets the HTTP exception handler on an . /// /// The type of the web server. /// The on which this method is called. /// The HTTP exception handler. /// with the OnHttpException /// property set to . /// is . /// The web server has already been started. /// is . /// /// public static TWebServer HandleHttpException(this TWebServer @this, HttpExceptionHandlerCallback handler) where TWebServer : IWebServer { @this.OnHttpException = handler; return @this; } /// /// Sets the unhandled exception handler on an . /// /// The type of the web server. /// The on which this method is called. /// The unhandled exception handler. /// with the OnUnhandledException /// property set to . /// is . /// The web server has already been started. /// is . /// /// public static TWebServer HandleUnhandledException(this TWebServer @this, ExceptionHandlerCallback handler) where TWebServer : IWebServer { @this.OnUnhandledException = handler; return @this; } } }