Skip to content

Commit

Permalink
handle exception
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 9, 2016
1 parent e00ebbd commit 771b8f2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Listener/Mvc.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public function attach(EventManagerInterface $events, $priority = 1)

private function handleException($e)
{

$exception = $e->getParam('exception');
if (! $exception) {
return;
}
}

public function renderError($e)
Expand All @@ -82,7 +85,7 @@ public function phpError($e)
public function execOnShutdown()
{
$error = error_get_last();
if ($error && ($error['type'] & E_FATAL)) {
if ($error && $error['type']) {
$this->phpErrorHandler($error['type'], $error['message'], $error['file'], $error['line']);
}
}
Expand All @@ -102,6 +105,6 @@ public function phpErrorHandler($errorType, $errorMessage, $errorFile, $errorLin
return;
}


}
}

0 comments on commit 771b8f2

Please sign in to comment.