Just having a play with the dynamic compilation and came up with a bit
of an enhancement for the JavaCompiler.cfc.
Line 163 (in v1.0 beta 2) - method throwException() - I changed to
this:
<cffunction name="throwException" access="private" hint="Throws an
Exception" output="false">
<cfargument name="type" hint="The type of exception" type="string"
required="Yes">
<cfargument name="message" hint="The message to accompany the
exception" type="string" required="Yes">
<cfargument name="detail" type="string" hint="The detail message
for the exception" required="No" default="">
<cfset var m = "" />
<cfset var d = "" />
<cfsavecontent variable="m"><cfoutput><pre>#arguments.message#</
pre></cfoutput></cfsavecontent>
<cfsavecontent variable="d"><cfoutput><pre>#arguments.detail#</
pre></cfoutput></cfsavecontent>
<cfthrow type="#arguments.type#" message="#m#" detail="#d#">
</cffunction>
It makes the compilation errors much, much easier to read if you wrap
them in the <pre> tag like that (at least when viewing the standard CF
error template).
Here's an example:
Current exception:
After my enhancement:
Mark wondered if this is the job of JavaLoader or the exception
handler code in your app... any thoughts on that?