Skip to content

Commit

Permalink
Add "exception"-context array key to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianstucke87 authored and Seldaek committed Nov 1, 2019
1 parent d477130 commit 446d54b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ class Foo
if ($this->logger) {
$this->logger->info('Doing work');
}

try {
$this->doSomethingElse();
} catch (Exception $exception) {
$this->logger->error('Oh no!', array('exception' => $exception));
}

// do something useful
}
Expand Down

0 comments on commit 446d54b

Please sign in to comment.