Fatal error: Exception thrown without a stack frame in Unknown on line 0

Submitted by nk on Tue, 2009-10-13 04:39.

This error message can mean one of the following:

  1. There was an exception while handling an exception.
  2. There was an exception while running a destructor.
  3. There was an exception while closing the session.
  4. 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.

Submitted by Berdir on Tue, 2009-10-13 07:02.

I hate these :)

There is another possibility, Exceptions can't be trown in autoload functions either.

User login