Tip: Gracefully handle exceptions by introducing the same exception

When you write a reasonably large application then you will get exceptions. One source of information about these problems are diagnostic log files. However, just because you can see that an exception has been reported it is not always obvious what state the wider system was in to trigger the problem. This presents two problems; 1) What caused the problem 2) How to gracefully handle the exception. My tip here concerns the latter, how can we be sure that any new code we introduce correctly handles the problem if we are not sure how to reproduce the issue?

Temporarily add the same exception

--

--

Unity, VR, Enterprise and .Net Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store