void Gallery_Error(object sender, EventArgs e) { // Grab a handle to the exception that is giving us grief. Exception ex = Server.GetLastError(); if (Context != null) { ex = Context.Error; } AppErrorController.HandleGalleryException(ex); }
private void Gallery_Error(object sender, EventArgs e) { // Grab a handle to the exception that is giving us grief. Exception ex = Server.GetLastError(); if (Context != null) { ex = Context.Error; } if (ex != null) { try { AppErrorController.HandleGalleryException(ex, GalleryId); } catch (Exception) { } } }