I do not understand why the output of my code is :
Logic error: 0
Logic error: 1
Exception: Unknown exception
Exception: 2
Something bad happened
What I understand is when i=0, it corresponds to case 0, which is then caught by catch(...) and is supposed to print "Something bad happened".
why is it that when i=0, the compiler outputs Logic error: 0 ?
isn't catch(exception ex) supposed to catch only the case2?