Merge pull request #16 from Anahkiasen/patch-1

Only register Whoops as Exception handler if debug
This commit is contained in:
Filipe Dobreira
2013-03-22 14:51:53 -07:00
@@ -32,8 +32,10 @@ class WhoopsServiceProvider extends ServiceProvider {
return $run->pushHandler($app['whoops.handler']);
});
$app->error(function($e) use ($app) {
$app['whoops']->handleException($e);
});
if ($app['config']->get('app.debug')) {
$app->error(function($e) use ($app) {
$app['whoops']->handleException($e);
});
}
}
}
}