> Does ColdFusion allow CFTRY blocks to be nested? I thought 
> it did, but after writing nested error handling, whenever 
> I rethrow an error from the inner block, I do not get the 
> outer block's catch clause. I get the CF default error 
> handler.
> 
> I'm using cfinclude a bit - would that cause problems?

Yes, you can nest CFTRY blocks, but if you do, it's probably not going to
work the way you think.

For example, you could do this:

<cftry>
        ... some problem code ...
        <cfcatch>
                <cftry>
                        ... some other problem code ...
                        <cfcatch>
                        ... some solution ...
                        </cfcatch>
                </cftry>
        </cfcatch>
</cftry>

However, if the inner CFTRY/CFCATCH generates an unhandled exception, that
won't be handled by the outer CFCATCH (in this case, that's pretty obvious
because it occurs in the outer CFCATCH).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to