Never tried to do that inside of a cfcatch block before but could you just
populate a variable with the email message and then outside the try block
check to see if the message is not empty and then send an email if so?

Bryan

----- Original Message -----
From: "sebastian palmigiani" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, May 21, 2001 10:39 PM
Subject: cfcatch and email


>
> 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

Reply via email to