I am not saying that your application should never throw errors. That's
simply not gonna happen. Sorry if that is the way I am coming off. What
I meant was that if this is an error that you are quite easily able to
reproduce, then instead of killing yourself getting at the VARIABLES
scope, start off by putting debugging code into the template that is
throwing the error.

Think about it this way - an error happens in one of two ways:

1. The error is happening on a page that is *likely* to throw an error
(which might be if you are reading from the file system or talking to a
web service). In cases like that, don't depend on the CFERROR tag or
onerror method. You should put try /catch info around those action and
deal with the error locally.

2. The error is happening randomly and is not easily repeatable. In this
case, yes, you cannot use a try/catch block (well, you can, but not
simply for debugging sessions if the error cannot be reproduced).

I guess the confusion comes from me interpruting you as trying to handle
case #1 using CFERROR, but perhaps you are just trying to get the
VARIABLES scope using case #2?

The error you are getting right now - is it something you can easily
reproduce?


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 30, 2007 4:47 PM
To: CF-Talk
Subject: Re: Error recovery

 >>Try putting a CFTRY / CFCATCH around the code that is throwing the
error

This is not an option, I want a system that can detect any error
hapening any where.
Try/catch should be used only for isolated situations (and I also use it
in many occasions)

 >>Bottom line.... Your page should NOT be throwing errors.

Of course, and as a matter of fact, I just decided after a 38 years
carrer as a developer that I will not implement any error of any type
anywhere in my code. :-)

 >>I assume we are talking about debugging here.

The very last step in a debugging process is to find the last bugs
during the beginning of the production cycle. Then it makes no
difference.
And even so, you still can have errors due to the server, the database,
hackers, stupid users, etc.

 >>Let's not lose sight of what the long-term goal is.

The worse idea would be to ignore all errors like if they were not
supposed to happen.
After all, it is their fault if they happen ;-)

--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276578
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to