I have code resembling the following:
try{ func1(); } catch(Exception e){ /Do something } static func1(){ func2(); } static func2(){ //Exception thrown here System.IO.StreamReader file = new System.IO.StreamReader(filePath); } when an exception is thrown by the line of code in func2() I get no notification in the catch clause. I do not explicitly throw anything, I just have regular function declarations which are static- no "throw" appears anywhere.
Why isn't the exception propagating upwards to the catch statement??
try/catcharoundfunc2. Also why are you going throughfunc1to then callfunc2? Why not just callfunc2?func2causes an exception?Exceptionexplicitly fromfunc2?