Exception wrapping and HTML pages

Posted by dotnetdev on Stack Overflow See other posts from Stack Overflow or by dotnetdev
Published on 2010-03-21T19:20:00Z Indexed on 2010/03/21 19:21 UTC
Read the original article Hit count: 206

Filed under:

Hi,

We have a sharepoint 2007 project at work. The exception handling policy is to log to the Sharepoint logs.

In this case, would the best approach be to call that method and then rethrow the exception higher up? Except if I rethrow it to be caught higher up, there is no other exception handling code so what would happen in this case?

Also, if you are going to display a more friendly error to the user (which uses information in the exception object), then this would be a good use of exception wrapping. Would it be a good idea to make a custom aspx page and add these to customerrors, so that on init (not sure of the exact event), I can display exception info in the passed parameter on the page. However, a static html page can't do this so I don't see the point in wrapping exceptions (unless there is a page or alert which uses the exception object). So if a project uses html pages for errors, is there a point in wrapping exceptions?

Thanks

© Stack Overflow or respective owner

Related posts about exception-handling