> If I have a cftry block which contains calls to custom > tags, what happens if there is an error in one of the > custom tags? I would expect that the exception would be > thrown out and caught by the catch block of the cftry, > but that doesn't seem to be the case. I'm still getting > untrapped errors out of the custom tags. Can anyone > confirm this, or am I doing something wrong? CF version > is 5.0 Professional.
You can, in fact, catch exceptions thrown by a custom tag within your calling page. Not all errors are exceptions, though - if you have a misspelled CFML tag in your custom tag, that will create a parsing error which occurs before runtime, rather than a runtime exception. In addition, the CFTRY block within your calling page has to contain CFCATCH blocks with the appropriate types: no type specified (which is equivalent to TYPE="ANY", more or less), TYPE="Application", or some custom type that's thrown by the custom tag using CFTHROW. 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