Handling exceptions in Rox
Basically, there are two major exception handles in Rox:
- The first is in place for historical reasons - it's more or less exactly the same as what's in Platform PT. It's put in place in index.php
- The second is put in place in RoxLauncher?, and wraps around the call that chooses and runs apps. This is the handler you'll most likely deal with if there are any exceptions during normal run time.
Handling
If an exception is thrown, the Rox exception handler will first attempt to log the exception and all info about it to disk. It will write to root/htdocs/exception.log with a bunch of details.
The next step is determining whether the system is currently running in debug mode (this setting is determined by the base.xml file in root). If the system is NOT running in debug mode, a nice error message will then be displayed, stating that we're sorry but BW does not work right now. If the system IS running in debug mode, the handler will check to see if it can load the ExceptionPage? class. If it can, it will then instantiate and object of this class and give it the exception info. ExceptionPage? will then display the same info that is logged to disk but in a nice wrapping of HTML and CSS. If ExceptionPage? is not available, the exception info is just output using print_r().
Finally, the exception handler quits after it's done handling things.
Code
See [phpdoc:default/_roxlauncher---roxlauncher.php.html roxlauncher]


