Skip to content

Commit

Permalink
zendframework#37 - Simplified dispatch handler - no need to clutter i…
Browse files Browse the repository at this point in the history
…t with tiny variable names and confusing assignments
  • Loading branch information
Ocramius committed Mar 7, 2016
1 parent cfcd326 commit a54d9af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ public function __invoke(
if (! $hasError && $arity < 4) {
return call_user_func($handler, $request, $response, $next);
}
} catch (Throwable $t) {
$err = $t;
} catch (Exception $e) {
$err = $e;
} catch (Throwable $throwable) {
return $next($request, $response, $throwable);
} catch (Exception $exception) {
return $next($request, $response, $exception);
}

return $next($request, $response, $err);
Expand Down

0 comments on commit a54d9af

Please sign in to comment.