Break on Runtime Exceptions
Debug configurations now include the option to break on runtime exceptions. This means that when an exception of a certain type, caught and/or uncaught, is thrown, the page will halt at that line of code as if there had been a breakpoint set. Only runtime exceptions can be detected by FusionDebug, any other exceptions or errors can not be handled.
The option to break on caught and uncaught exceptions is given in the debug configuration. A caught exception is one that is thrown whilst wrapped in a <cftry> tag body, and properly caught with a <cfcatch> tag. However, this only applies to Railo servers. ColdFusion defines a caught exception as one thrown in a <cftry> body, but does not need to have a corresponding <cfcatch> tag. An uncaught exception is one thrown outside of a <cftry> tag body.
There are differences between the exception types available in the ColdFusion connector and the Railo connector. The ColdFusion connector can only break on custom exceptions. The Railo connector can break on application, expression, database, custom_type, lock, missinginclude, native, security and template exceptions.
How to Setup Break on Runtime Exceptions
An important point to note is that when setting up Break on Runtime Exceptions, the debug configuration must be re-launched so that the connector can re-connect. If the debug configuration is changed while connected you will see no affect of this change until re-connecting.
To enable the detection of runtime exceptions you have to select which type you wish to break on and whether caught and/or uncaught variations are included.
Above, the lock exception has been selected for both caught and uncaught variations.
Now when a lock type exception is thrown, either caught or uncaught, the application will halt. Both caught and uncaught situations are shown below, demonstrating the cause of exception and the position of the break.
Caught Exception Breakpoint Fired
Uncaught Exception Breakpoint Fired

Buy Online


