Advice Catching Exceptions – a trick from a mentor

Advice Catching Exceptions – a trick from a mentor

Using ASPX – we catch general exceptions – well some messages are too general. Here is some advice emailed to me from a mentor and friend Sjoerd.

UPDATE: Be careful on what messages get thrown/exposed to the final client. If there are open data that is sensitive – the advice below might bee too revealing.

When catching errors, please make sure you bring back the following properties from the exception:

  • Ex.StackTrace
  • Ex.Message
  • Ex.InnerException

He included these links

If you like, you can throw an exception on purpose and look at what the properties will return you.

ELB Solutions.com Inc.
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.