_drupal_log_error() calls theme('maintenance_page') if its parameter $fatal is true.
In the case of an error that prevents Drupal from completing the request, ie. an actual fatal error, this makes sense.
It doesn't make sense for a recoverable fatal error (E_RECOVERABLE_ERROR), after which Drupal continues to process the request.
But, the theme('maintenance_page') call clears all $_SESSION messages (debugging or otherwise), e.g. those set by drupal_set_message() or dpm().
Since the output of the theme function is never rendered, those messages do not get logged to watchdog, and are simply discarded.
Comments
Comment #1
AaronBaumanComment #10
catchAs far as I can see this is no longer the case, drupal_maintenance_theme() doesn't clear messages, and _drupal_log_error() is dealing with session messages directly. Closing as outdated.