Download & Extend

Add support for exception handling

Project:Devel
Version:7.x-1.x-dev
Component:devel
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

It would be really great if Devel could support its backtrace handling for exceptions just like errors as it is very difficult to debug core exceptions like "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7406 of /includes/common.inc)." without having to temporarily hack core and add a manual ddebug_backtrace() before the exception is thrown.

Comments

#1

Yes, definitely, but I'm not aware of any possibility to do that at the PHP level. Xdebug does it...

Let us know if you know more...

#2

It's very possible. Instead of set_error_handler() you use set_exception_handler().

#3

Ah, yes, I was confused about http://php.net/manual/en/function.set-error-handler.php:

The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.

nobody click here