Tom,
 
We use try/catch blocks all over the place in our code and have never noticed a significant performance hit.  You could try using getTickCount() around the code both with and without the try/catch block and should get an idea of any performance hit.  I suspect it will be minimal if you can even note a difference.
 
Hope this helps,
Tom Woestman


From: Schreck, Thomas (PPC) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 1:24 PM
To: [EMAIL PROTECTED]
Subject: try catch issue

We arrange modules in a layout and programmatically generate the layout into a .cfm page.  We are using <cfimport> tag to call the modules instead of <cfmodule> because <cfmodule> is slow.  Anyways, the issue at hand is how to best manage when a module produces an error.  Ideally, we would like to have the module handle this itself, but we are dealing with a lot of pre-existing modules, so going back to each one is time consuming and not an option.

 

That said, what do you think about wrapping a <cftry>/<cfcatch> around each module call within the programmatically generated page?  How costly is <cftry>/<cfcatch> in terms of performance?

 

Thanks -

 

Tom Schreck

817-252-4900

[EMAIL PROTECTED]

 

I have not failed.  I've found 10,000 ways that won't work.

 

- Thomas Edison

 

Reply via email to