Alan,

i searched the list (with *my* fusebox lists app, very handy) and 
scanned the results, as i wanted to check where we are at with this so 
far. 40 hits on a search of cftry, and 19 hits on a search of cferror. i 
searched back to when FB3 was released. after reading through all that, 
at far as i understand, you can certainly put the CFTRY/CFCATCH around 
the "include the core files" section in your index.cfm - the situation 
you face is that as soon as you catch an error there, you lose both your 
layout, and the variables you might be setting in your fbx_settings 
file. now that might not be a problem.

one way of handling the layout loss *might* be to redirect the error 
back into the application to some error circuit, some people seemed to 
be going in this direction. you get your layout back that way, BUT, when 
i tried that, the first error the app caught set up an infinite loop, 
and i had 1000's of emails in my inbox overnight. i never did that 
again. intelligent use of a cfabort tag might catch that, but still ... 

so in my case, i settled, for now, on redirecting the errors to a stand 
alone template, and i just have to duplicate a little layout there. not 
really a problem after all, just a few minutes of cut and paste. i 
wasn't worried about the fbx_settings loss.

seems like others are going for placing the try/catch tags around all 
their cfswich blocks in each circuit's fbx_switch file in order to 
preserve the layout and the fbx_setting stuff whenever possible. here 
you are duplicating code for each circuit, which might lead to some 
inconsistancy, so maybe a solution might be to place a cftry tag at the 
beginning of each switch block and cfinclude the cfcatch's and the 
closing cftry tag and put that in your error directory or something like 
that. someone had a custom tag at the end of each switch block, but that 
might generate more of a performance hit than a simple include, but 
basically along the same line.

if you go the around the switch block route, you'll probably need them 
around your core file includes anyway in the index.cfm - 

interestingly, the only statement i could find in my search on these 2 
terms from someone "in the know" was from Nat:

From: Nat Papovich    February 16, 2002   09:04
 
If you want a practical solution, I would recommend using a <cferror> 
tag in
index.cfm. That will catch all errors, site-wide, including any bad 
circuits
on the URL.

NAT

also, Hal has mentioned a few times, in reference to building error 
handling into FB3 "we are working on it ...", but nothing 
substantiative. 

I also looked through the FB3 whitepaper, thinking i had forgotten what 
was written there, but i didn't find any reference at all to error 
handling in FB3. so if it seems there is a hole here, it's true.

contradictions or corrections invited.

nando

Alan McCollough wrote:
> Okay, I'm banging in code after knocking out a framework in Adalon. This 
> be
> my first production FB3 app.
> 
> I know this has been asked, but topica's search, well, what can you 
> say...
> 
> Where would I put in a CFTRY/CFCATCH in FB3? In FB2 I always encapsulate 
> all
> of index.cfm in a CFTRY/CFCATCH; but I recall you can't do this the same 
> way
> with FB3...
> 
> Alan McCollough
> Web Programmer
> Alaska Native Medical Center
> 
> 
> 

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to