Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.362
diff -u -r1.362 bootstrap.inc
--- includes/bootstrap.inc	11 Mar 2010 21:23:05 -0000	1.362
+++ includes/bootstrap.inc	14 Mar 2010 21:25:55 -0000
@@ -1842,7 +1842,23 @@
 function _drupal_exception_handler($exception) {
   require_once DRUPAL_ROOT . '/includes/errors.inc';
   // Log the message to the watchdog and return an error page to the user.
-  _drupal_log_error(_drupal_decode_exception($exception), TRUE);
+  
+  try {
+    _drupal_log_error(_drupal_decode_exception($exception), TRUE);
+  }
+  catch (Exception $exception2) {
+  
+    // Another exception was thrown. Lets make a final attempt to report it.
+  
+    $error_level = variable_get('error_level', ERROR_REPORTING_DISPLAY_ALL);
+    if ($error_level == ERROR_REPORTING_DISPLAY_ALL || (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update')) {
+
+      print 'Exception thrown while handling exception.<br /><br />';
+      
+      print 'Original ' . str_replace("\n", '<br />', $exception) . '<br /><br />';
+      print 'Additional ' . str_replace("\n", '<br />', $exception2);
+    }
+  }
 }
 
 /**
Index: includes/errors.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/errors.inc,v
retrieving revision 1.2
diff -u -r1.2 errors.inc
--- includes/errors.inc	6 Mar 2010 06:31:24 -0000	1.2
+++ includes/errors.inc	14 Mar 2010 21:25:55 -0000
@@ -163,13 +163,7 @@
     $number++;
   }
 
-  try {
-    watchdog('php', '%type: %message in %function (line %line of %file).', $error, $error['severity_level']);
-  }
-  catch (Exception $e) {
-    // Ignore any additional watchdog exception, as that probably means
-    // that the database was not initialized correctly.
-  }
+  watchdog('php', '%type: %message in %function (line %line of %file).', $error, $error['severity_level']);
 
   if ($fatal) {
     drupal_add_http_header('Status', '500 Service unavailable (with message)');
