Can I catch exit() and die() messages?

Gu3rr3r0

New Member
I'd like to be able to catch \[code\]die()\[/code\] and \[code\]exit()\[/code\] messages. Is this possible? I'm hoping for something similar to \[code\]set_error_handler\[/code\] and \[code\]set_exception_handler\[/code\]. I've looked at \[code\]register_shutdown_function()\[/code\] but it seems to contain no context for the offending \[code\]die()\[/code\] and \[code\]exit()\[/code\] calls.I realize that \[code\]die()\[/code\] and \[code\]exit()\[/code\] are bad ways to handle errors. I am not looking to be told not to do this. :) I am creating a generic system and want to be able to gracefully log \[code\]exit()\[/code\] and \[code\]die()\[/code\] if for some reason someone (not me) decides this is a good idea to do.
 
Back
Top