Skip to content

Commit

Permalink
Custom error handler class: fix signature
Browse files Browse the repository at this point in the history
CustomHandler::__invoke() should have $exception instead of $args
to match the other examples.
  • Loading branch information
gkralik committed Apr 21, 2017
1 parent 3f3a7db commit e6930d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/handlers/error.md
Expand Up @@ -70,7 +70,7 @@ Error handlers may also be defined as an invokable class.

{% highlight php %}
class CustomHandler {
public function __invoke($request, $response, $args) {
public function __invoke($request, $response, $exception) {
return $response
->withStatus(500)
->withHeader('Content-Type', 'text/html')
Expand Down

0 comments on commit e6930d6

Please sign in to comment.