CFRETHROW
Rethrows the currently active exception. <CFRETHROW> preserves the exception's CFCATCH.TYPE and CFCATCH.TAGCONTEXT information.
See also CFTRY/CFCATCH.
Syntax
<CFRETHROW>
Usage
Use the <CFRETHROW> tag within a <CFCATCH> block. This tag is useful in error handling code when the error handler is not able to successfully handle the thrown error.
Example
cfrethrow
<!--- This example shows the use of CFRETHROW ---> <HTML> <HEAD> <TITLE>CFRETHROW Example</TITLE> </HEAD> <BASEFONT FACE="Arial, Helvetica" SIZE=2> <BODY bgcolor="#FFFFD5"> <H3>CFRETHROW Example</H3> <!--- Rethrow a DATABASE exception. ---> <CFTRY> <CFTRY> <CFQUERY NAME="GetMessages" DATASOURCE="cfsnippets"> SELECT * FROM Messages </CFQUERY> <CFCATCH TYPE="DATABASE"> <!----------------------------------------------------------- ...
Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.