Commit 973ee703 authored by Fabien Potencier's avatar Fabien Potencier

added exception in the Monolog context when appropriate (closes #613, closes #614)

parent 31139bab
...@@ -73,9 +73,9 @@ class MonologServiceProvider implements ServiceProviderInterface ...@@ -73,9 +73,9 @@ class MonologServiceProvider implements ServiceProviderInterface
$app->error(function (\Exception $e) use ($app) { $app->error(function (\Exception $e) use ($app) {
$message = sprintf('%s: %s (uncaught exception) at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()); $message = sprintf('%s: %s (uncaught exception) at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine());
if ($e instanceof HttpExceptionInterface && $e->getStatusCode() < 500) { if ($e instanceof HttpExceptionInterface && $e->getStatusCode() < 500) {
$app['monolog']->addError($message); $app['monolog']->addError($message, array('exception' => $e));
} else { } else {
$app['monolog']->addCritical($message); $app['monolog']->addCritical($message, array('exception' => $e));
} }
}, 255); }, 255);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment