public static IApplicationBuilder UseSymonExceptionHandler(this IApplicationBuilder app, ExceptionHandlerOptions options) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } return(app.UseMiddleware <ExceptionHandlerMiddleware>(Options.Create(options))); }