Skip to content

Firefly III: a personal finances manager

Try changes to the handler

James Cole6e5bca8306fd
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index b4ead350ef..3595acf0c3 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -42,6 +42,29 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $exception)
{
+ if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
+
+ $isDebug = env('APP_DEBUG', false);
+
+ return response()->view('errors.FireflyException', ['exception' => $exception, 'debug' => $isDebug], 500);
+ }
+
+ return parent::render($request, $exception);
+ }
+
+
+ /**
+ * Report or log an exception.
+ *
+ * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
+ *
+ * @param Exception $exception
+ *
+ * @return void
+ */
+ public function report(Exception $exception)
+ {
+
if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
// log
@@ -75,26 +98,9 @@ class Handler extends ExceptionHandler
// could also not mail! :o
Log::error($e->getMessage());
}
- $isDebug = env('APP_DEBUG', false);
-
- return response()->view('errors.FireflyException', ['exception' => $exception, 'debug' => $isDebug], 500);
+
}
- return parent::render($request, $exception);
- }
-
-
- /**
- * Report or log an exception.
- *
- * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
- *
- * @param Exception $exception
- *
- * @return void
- */
- public function report(Exception $exception)
- {
parent::report($exception);
}
}