This error message can mean one of the following:
- There was an exception while handling an exception.
- There was an exception while running a destructor.
- There was an exception while closing the session.
- There was an exception while running a shutdown function.
You can quickly separate whether the problem is within the normal request flow or outside by wrapping index.php in a try-catch block with an empty catch. So add try { to the top of index.php and } catch (Exception $e) {} to the bottom. For better error reporting, try something like } catch (Exception $e) {file_put_contents('/tmp/log', $e->getMessage() . ' file: ' . $e->getFile() . ' on line '. $e->getLine()); }. If the error is still with you, find all the shutdown functions (register_shutdown_function registers them) and wrap them similarly and also _drupal_session_write. If it's in a destructor, then look around for __destruct methods, right now core only has two, so it's not so hard to find out what goes on. I wish someone wrote this up for me earlier so that I would have saved four hours of desperate debugging.
Commenting on this Story is closed.



![Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]](../sites/all/themes/drupal4hu/images/bg-center/bg-center_4.png)















I hate these :)
There is another possibility, Exceptions can't be trown in autoload functions either.