Using an Exception to Exit PHP Application-Collection of common programming errors
My app has a registered shutdown function and it seems there’s some issues with that and my method of using an exception with a try/catch to exit the application (instead of using the exit() method due to FastCGI not liking this).
My problem is that if another exception is thrown in the try/catch block that isn’t the ExitApp exception, it causes some unexpected results and the end result is the ExitApp exception isn’t caught.
I’m seeing this on PHP 5.3.6, going to test it on another version now, but I’m curious if anyone can immediately point out what’s wrong here.