structured exception handling should be kept as close to the questionable
code as possible. One of it's error types is "missinginclude", which should
also help to illustrate the logical error in placing opening and closing
error handling tags in seperate files to be included. What you can do,
Alternately, you could have a main page that has a cftry/cfcatch block, and
include the meat of the page within (a la Fusebox). Worth a shot, neh?
--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC 28270
www.solutionmasters.com
704.563.5559 x 228 Voice
Haven't tried it but theoretically you might be able to:
application.cfm would contain: cf_error_check
onrequestend.cfm would contain: /cf_error_check
error_check.cfm would contain:
!--pseudo code--
if executionmode eq start
cftry cfcatch
else
/cfcatch/cftry
onrequestend.cfm
On 12/13/00, Neil H. penned:
I just found, disappointingly enough that you can't have a cftry at the
top of a document via a CFinclude and the rest in another include at the
bottom? Is there a work around. I don't want to use a handler, and I want
the same error checking code on every page.
don't want url parameters.
Thanks,
Neil
- Original Message -
From: "Bud" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 12:45 PM
Subject: Re: cftry cfcatch/cfcatch/cftry
On 12/13/00, Neil H. penned:
I just found, disappointingly e
Ok, you wanted a hint, here's big a hint. Obviously, the advantage to using
a global CFTRY/CFCATCH is that variables are still scoped in the exception
block, unlike the global exception handler. The open and close cftry (as
you said) must be in the same template, the solutions is surprisingly
i use a custom tag. the cftry are included in very page. so the custom tag
will perform what ever error handling required.
cftry
... codes ...
cfcatch type="any"
cf_errorhandler
/cfcatch
/cftry
-ken
- Original Message -
From: Neil H. [EMAIL PROTECTED]
Subject: cftry
7 matches
Mail list logo