Skip to content

Commit

Permalink
if the exception has a render method, just use that
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 1, 2017
1 parent 458e66e commit ed51160
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ protected function shouldntReport(Exception $e)
*/
public function render($request, Exception $e)
{
if (method_exists($e, 'render')) {
return $e->render($request);
}

$e = $this->prepareException($e);

if ($e instanceof HttpResponseException) {
Expand Down

0 comments on commit ed51160

Please sign in to comment.