protected virtual void OnUnhandledException(HttpExceptionEventArgs e) { var ev = UnhandledException; if (ev != null) ev(this, e); }
private void OnException(object sender, HttpExceptionEventArgs e) { e.Handled = true; var buffer = Encoding.UTF8.GetBytes(e.Exception.ToString()); e.Response.ContentType = "text/plain"; e.Response.OutputStream.Write(buffer, 0, buffer.Length); }
internal bool RaiseUnhandledException(HttpContext context, Exception exception) { if (context == null) throw new ArgumentNullException("context"); var e = new HttpExceptionEventArgs(context, exception); OnUnhandledException(e); return e.Handled; }
protected virtual void OnUnhandledException(HttpExceptionEventArgs e) { UnhandledException?.Invoke(this, e); }
void _server_UnhandledException(object sender, HttpExceptionEventArgs e) { e.Handled = true; Log.Warn("Unhandled Help Server exception", e.Exception); }