using System;
namespace EmbedIO
{
partial class WebModuleExtensions
{
///
/// 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 module's configuration is locked.
///
///
public static TWebModule HandleHttpException(this TWebModule @this, HttpExceptionHandlerCallback handler)
where TWebModule : IWebModule
{
@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 module's configuration is locked.
///
///
public static TWebModule HandleUnhandledException(this TWebModule @this, ExceptionHandlerCallback handler)
where TWebModule : IWebModule
{
@this.OnUnhandledException = handler;
return @this;
}
}
}