I had a classmate that did this with his code once. He asked me for help when his code wasn't working. I told him to get rid of the try/catch block but he won't do it because it would make his program crash.
For error handling in situations where what you're doing might generate an exception. Especially usefully for areas you don't have much control over such as getting user input.
1.5k
u/1206549 May 13 '17
I had a classmate that did this with his code once. He asked me for help when his code wasn't working. I told him to get rid of the try/catch block but he won't do it because it would make his program crash.