Nope... if the <cfcatch> tag is on your error handling template then it will
never "catch" anything. The code you have below would throw an error without
the <cftry> tags.  There is no error thrown on the error handler.  Instead
the error thrown on the previous request is posted to the error page as the
variable "error".

Try this:

<cfdump var="#error#"> on your error handling template.

-Mark
  -----Original Message-----
  From: cf coder [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 08, 2004 12:34 PM
  To: CF-Talk
  Subject: Re: exception handling, kindly help

  Hi there, sorry for not getting back sooner. I've been banging my head
trying to find a solution ALL day. I would really appreciate your help. I
have added the custom error message in the error handler file.

  <cfcatch type="any">
      <cf_caughtIt catchMessage="#cfcatch.message#">
  </cfcatch>

  I modified caughtIT.cfm a bit. It now contains the custom error message.
What I also want to do in the background now is send the email to the
administrator with the complete error information.

  Here is the code:

  <cfparam name="attributes.catchMessage" default="application error">

  <table>
  <tr>
  <td>
     Oops! an error has occurred
  </td
  </tr>
  </table>

  I hope I'm making sense? I want to now add the cfmail tag either on this
page or in another custom tag just below the code above that has the
detailed error info in the email body. Can you please please show me how to
do this man! I would be so thankful to anybody who does.

  CatchIT.cfm is a error template. I beleive I should be using the cferror
tag, I don't know how to use this.

  This is what I want to output in the email

  <CFMAIL
      type="HTML"
      FROM="[EMAIL PROTECTED]"
      TO="#administrator#"
      SERVER="someserver"
      PORT="25"
      SUBJECT="#cgi.SCRIPT_NAME#">

  <h2>Error</h2>
  <cfif isdefined("Error")>
  <cfdump var="#error#">
  <cfelse>
  No Error info defined
  </cfif>

  <h2>Details</h2>
      <cfif attributes.catchMessage neq "">
          <cfdump var="#attributes.catchMessage#">
      </cfif>

  <h2>Form Info</h2>
      <cfdump var="#form#">

  <h2>URL Details</h2>
      <cfdump var="#url#">

  </CFMAIL>

  I would really apprecaite your help
  Regards
  cfcoder
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to