Try Catch statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I use Try Catch statements a lot in my applications so that the app
automatically e-mails me with any errors that the users are encountering. I
was just wondering if there are any performance issues with using Try Catch
statements a lot in an app?

Thanks,
Dusty Hackney
 
Dusty said:
Hello,

I use Try Catch statements a lot in my applications so that the app
automatically e-mails me with any errors that the users are encountering. I
was just wondering if there are any performance issues with using Try Catch
statements a lot in an app?

Thanks,
Dusty Hackney

It's not resource intensive. Unless you have hundreds of them per page I
wouldn't worry about it... There's nothing wrong with handling (and
logging) errors - much the inverse.
 
In addition, having the syntax for catching errors does not affect
performance. If the application is working as expected, there should be no
decrease in performance.

Handling exceptions that are thrown are expensive but if something bad is
happening, you would want to know. By the way, considering the overhead in
emailing the errors, I would say that the performance hit by catching
exceptions is overshadowed by the email operations. :-)
 
We save exception logs to an SQL database and poll the database each hour
and if new records exist, then we mail the administrator/developers.
 
Back
Top