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 { if (GalleryId > int.MinValue) { AppEventController.HandleGalleryException(ex, GalleryId); } else { AppEventController.HandleGalleryException(ex); } Utils.PerformMaintenance(); // This might fix errors like missing/corrupt records in the database. } catch { } } }
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 { if (GalleryId > int.MinValue) { AppEventController.HandleGalleryException(ex, GalleryId); } else { AppEventController.HandleGalleryException(ex); } } catch { } } }