Skip to content

Commit 446d54b

Browse files
sebastianstucke87Seldaek
authored andcommitted
Add "exception"-context array key to docs
1 parent d477130 commit 446d54b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ class Foo
3838
if ($this->logger) {
3939
$this->logger->info('Doing work');
4040
}
41+
42+
try {
43+
$this->doSomethingElse();
44+
} catch (Exception $exception) {
45+
$this->logger->error('Oh no!', array('exception' => $exception));
46+
}
4147

4248
// do something useful
4349
}

0 commit comments

Comments
 (0)