Skip to content

Commit

Permalink
Merge pull request #1488 from akrabat/disable-error-handler
Browse files Browse the repository at this point in the history
Don't call errorHandler if we don't have one
  • Loading branch information
silentworks committed Sep 5, 2015
2 parents a1427aa + 821511e commit faaf470
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Slim/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ public function run($silent = false)
} catch (SlimException $e) {
$response = $e->getResponse();
} catch (Exception $e) {
if (!$this->container->has('errorHandler')) {
throw $e;
}
/** @var callable $errorHandler */
$errorHandler = $this->container->get('errorHandler');
$response = $errorHandler($request, $response, $e);
Expand Down

0 comments on commit faaf470

Please sign in to comment.