<!--- CFTRY example, using CFTHROW to create
a sample error --->
<HTML>

<HEAD>
<TITLE>
CFTRY Example
</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>

<BODY  bgcolor="#FFFFD5">

<H3>CFTRY Example</H3>

<!--- open a CFTRY block --->
<CFTRY>

<!--- note that we have misspelled the tablename
"employees" as "employeeas" --->
<CFQUERY name="TestQuery" DATASOURCE="cfsnippets">
SELECT *
FROM EMPLOYEEAS
</CFQUERY>

<P>... other processing goes here

<!--- specify the type of error for which we are fishing --->
<CFCATCH TYPE="Database">
<!--- the message to display --->
	<H3>You've Thrown a Database <B>Error</B></H3>
<CFOUTPUT>
<!--- and the diagnostic message from the Cold
Fusion server --->
    <P>#CFCATCH.message#</P>
	<P>Caught an exception, type = #CFCATCH.TYPE# </P>
	<P>The contents of the tag stack are:</P>
	<CFLOOP index=i from=1 to = #ArrayLen(CFCATCH.TAGCONTEXT)#>
  		<CFSET sCurrent = #CFCATCH.TAGCONTEXT[i]#>
  			<BR>#i# #sCurrent["ID"]# (#sCurrent["LINE"]#,#sCurrent["COLUMN"]#) #sCurrent["TEMPLATE"]#
	</CFLOOP>
</CFOUTPUT>
</CFCATCH>

</CFTRY>


</BODY>

</HTML>       
