Return error message in profile exception handler response

This commit is contained in:
Adam Lavin 2015-11-30 01:00:20 +00:00
parent 3c0e922b28
commit 3ba8467870

View file

@ -47,9 +47,11 @@ class Profiler
try {
$response = $next($request);
} catch (\Exception $e) {
$response = \Response::make(['exception' => $e->getTrace()], 500);
$response = \Response::make([
'message' => $e->getMessage(),
'exception' => $e->getTrace()
], 500);
$profiler->log('error', $e->__toString(), []);
}