Description
Sometimes I have the need (in controllers) to convert some internal application exceptions to more meaningful (HTTP-appropriate) ones.
For example, some object that cannot be found in a database and triggers an exception should become a NotFoundHttpException, or I want to keep the internal exception of my authentication subsystem but throw an AccessDeniedHttpException.
The "previous" exception property of \Exception is well suited for that and in kernel.debug I'll get all that information (I guess, from what I recall the exception pages...)
In production, however, the user gets the error page and all the relevant information must go to the logs.
So do you agree it would be a good thing to make the ExceptionListener also log the previous exceptions?