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

I’m getting a really cryptic error and I’m not sure where to begin.

The site (http://www.petcercise.com/) works fine, but when I attempt to go to /wp-admin/ I get the following error:

Read More

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

I’ve googled it and searched the Worpress support site. This error seems to be commonly associated with new plugins, but I have not recently installed any new plugins on this site.

I have two questions:

  1. How do I go about diagnosing the root cause?

  2. How do I go about recovering from this error if I can’t diagnose the problem?

Related posts

Leave a Reply

1 comment

  1. About the Error

    Exception thrown without a stack frame

    Means that someone’s code threw and exception in a place where it wasn’t allowed to throw an exception. For instance, one cannot throw an exception in an object’s destructor. There’s a fairly good example of how this might happen in the php docs.

    In short, if you have an exception handler (registered with set_exception_handler and throw an exception in it stuff will go wrong and you see the error message like the above.

    Or, let’s say you have an error handler (registered with set_error_handler that does something like convert warnings and anything else to ErrorException‘s. Then you accidentally use an undefined variable in a destructor some place. Same result: exception thrown where no exceptions may be thrown.

    Tracking It Down

    This issue is likely not happening in the WordPress core, so I would start the search in your plugins and themes. Look for calls to set_exception_handler or set_error_handler. If you have are into the command line, you could use a tool like ack or grep:

    $ ack "set_(error|exception)_handler"
    

    Then you could start looking for instances where exceptions are thrown. Look for the throw keyword and see wehre exceptions are getting thrown.

    $ ack throw
    

    If all else fails and you can’t locate the source of this, start deactivating plugins and themes until it goes away. Obviously you can’t use the plugin list table of the theme area in the admin, so you’ll need to go in and rename plugin files/folders via FTP to deactivate them. You can do the same thing with themes. Do this one at a time until the issue goes away. Then reactivate the plugin and see if it comes back.