--- devel.module 2011-04-08 04:31:29.000000000 +0100 +++ devel.module 2011-05-21 10:33:41.000000000 +0100 @@ -11,6 +11,7 @@ define('DEVEL_QUERY_SORT_BY_DURATION', 1 define('DEVEL_ERROR_HANDLER_NONE', 0); define('DEVEL_ERROR_HANDLER_STANDARD', 1); define('DEVEL_ERROR_HANDLER_BACKTRACE', 2); +define('DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE', 3); define('DEVEL_MIN_TEXTAREA', 50); @@ -527,6 +528,7 @@ function devel_set_handler($handler) { // do nothing break; case DEVEL_ERROR_HANDLER_BACKTRACE: + case DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE: if (has_krumo()) { set_error_handler('backtrace_error_handler'); } @@ -634,6 +636,11 @@ function backtrace_error_handler($error_ } print t('%error: %message in %function (line %line of %file).', $variables) ." =>\n"; krumo($nicetrace); + + // Also show the standard drupal message if this was requested via the admin option for both backtrace and message. + if (variable_get('devel_error_handler', DEVEL_ERROR_HANDLER_STANDARD) == DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE) { + drupal_set_message(t('%error: %message in %function (line %line of %file).', $variables), $type[1]); + } } watchdog('php', '%error: %message in %function (line %line of %file).', $variables, $type[1]); --- devel.admin.inc 2011-04-08 04:31:29.000000000 +0100 +++ devel.admin.inc 2011-05-21 09:25:48.000000000 +0100 @@ -113,6 +113,7 @@ function devel_admin_settings() { ); if (has_krumo()) { $form['devel_error_handler']['#options'][DEVEL_ERROR_HANDLER_BACKTRACE] = t('Backtrace'); + $form['devel_error_handler']['#options'][DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE] = t('Backtrace plus standard drupal message'); } $options = drupal_map_assoc(array('default', 'blue', 'green', 'orange', 'white', 'disabled'));