I want to send an email with database error info using cftry/cfcatch. But it
is not working. Am I trying to do something that can't be done within a
cfcatch block?
Sebastian
-------------------------------
<cftry>
<cfquery name='foo' datasource='foo'>
Select * from members
</cfquery>
<cfcatch type="database">
<!--- EMail WebMaster --->
<cfmail from="[EMAIL PROTECTED]"
type="HTML"
to="[EMAIL PROTECTED]"
subject="Database Error">
Date: #DateFormat(Now(), "MM D, YYY")# #TimeFormat(Now(), "h:mm tt")#<br>
Error Type: #CFCATCH.Type#<br>
Message: #CFCATCH.Message#<br>
Template: #CGI.CF_Template_Path#<br>
Referer: #CGI.HTTP_Referer#<br><br>
Details:
#CFCATCH.Detail#<br><br>
</cfmail>
<cflocation url="index.cfm?go=Error"> --->
</cfcatch>
</cftry>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists