<!--- 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">
		<!----------------------------------------------------------- 
		If the database signalled a 50555 error, we can ignore it, 
		otherwise rethrow the exception. 
		------------------------------------------------------------->
		<cfif cfcatch.sqlstate neq 50555>
			<cfrethrow>
		</cfif>
	</cfcatch>
	</cftry>
	
<cfcatch>
	<h3>Sorry, this request can't be completed</h3>
	<h4>Catch variables</h4>
	<cfoutput>
		<cfloop collection=#cfcatch# item="c">
			<br><cfif IsSimpleValue(cfcatch[c])>#c# = #cfcatch[c]#</cfif>
		</cfloop>
	</cfoutput>
</cfcatch>
</cftry>
    
</BODY>
</HTML> 
    