I use the attached error handling component to email myself the error details. I'll be adding a log(string Logfile) method, which I'll also use to report errors in any component. So far, I haven't had any problems with it. Let me know if you find it useful.
<cftry> (potential error code) <cfcatch type="any"> <cfset errHand = createObject("path.to.errorHandler.cfc").init(cfcatch) /> <cfset errHand.emailError("[EMAIL PROTECTED]") /> <cfrethrow /> </cfcatch> </cftry>
Gotcha. Thanks for the code snippet.
I guess if you're calling a webservice and it fails, then Axis should rightly throw an Axis fault because it has no knowledge of what the actual webservice back end implementation is. This just makes it tough to create error handling code that works uniformly on CFCs invoked in different ways (CFINVOKE/Webservice, CFSCRIPT/CreateObject).
Thanks,
-- Alex
-----Original Message----- From: Alexander Sherwood [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: [CFCDev] CFTHROW with a Webservice
If you use CFTHROW within CFC that is invoked via a webservice, the default error returned is an Application/Axis fault. Is there any way to return just the native error type/information thrown in the CFC without the Axis wrapper?
How have others worked around this?
Thanks, ---------------------------------- Alex Sherwood PHS Collection Agency THE COLLECTORS T: 301.215.4200 F: 301.664.6834 W: www.phs-net.com
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
