sonata-project/SonataAdminBundle — pull request #2446 by greg0ire (2014-09-27 11:29:10+00:00)
Title: [2.3] Log previous exceptions

This is #2438 + 1 commit : b931601 . This commit adds two things to the log context array :

- an 'exception' key, that as you can read in [the PSR-3 spec](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#13-context), can be useful to get a nice stack trace
- a 'previous_exception_message', that contains the previous exception message when available. This is very important, because the current exception message, is not very helpful. It is something among the lines of

> Failed to create some object

While the previous exception is from the storage layer, describing something like :

> Unicity constraint for some_column failed

This is way more useful, let's log it.