How does one catch a custom exception with try-catch
in cfscript?
<cffunction name="myFunction">
<cfset foo = 1>
<cfif foo EQ 1>
<cfthrow type="customExcp" message="FAIL!">
</cfif>
</cfif>
The try-catch
is in cfscript. What should go into the catch()
statement?
try {
myFunction();
} catch () {
writeOutput("Ooops");
}