using System; using System.Net; using System.Threading.Tasks; namespace EmbedIO { /// /// A callback used to provide information about an unhandled exception occurred while processing a request. /// /// An interface representing the context of the request. /// The unhandled exception. /// A representing the ongoing operation. /// /// When this delegate is called, the response's status code has already been set to /// . /// Any exception thrown by a handler (even a HTTP exception) will go unhandled: the web server /// will not crash, but processing of the request will be aborted, and the response will be flushed as-is. /// In other words, it is not a good ides to throw HttpException.NotFound() (or similar) /// from a handler. /// public delegate Task ExceptionHandlerCallback(IHttpContext context, Exception exception); }