mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-03 20:55:05 +00:00 
			
		
		
		
	Try changes to the handler
This commit is contained in:
		@@ -42,6 +42,29 @@ class Handler extends ExceptionHandler
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function render($request, Exception $exception)
 | 
					    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) {
 | 
					        if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // log
 | 
					            // log
 | 
				
			||||||
@@ -75,26 +98,9 @@ class Handler extends ExceptionHandler
 | 
				
			|||||||
                // could also not mail! :o
 | 
					                // could also not mail! :o
 | 
				
			||||||
                Log::error($e->getMessage());
 | 
					                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);
 | 
					        parent::report($exception);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user