How Is It Possible That The Exception Is Null Inside Of A Catch Block?
I'm curious how the following is possible. catch (Exception e) { e.printStackTrace(); } When I debug my code he jumps into the catch blog - so far so good - but than i check w
Solution 1:
Probably it is a problem with the debugger or the virtual machine - the exception is lazy loaded, that is, the exception is not loaded until needed. As long as no method from the exception is called, its data is not loaded. When the first method is called, the virtual machine fills the exception fields.
You should see the exception after executing the printStackTrace or using the debugger to execute one method from that exception (e.g. Expression View in Eclipse).
Post a Comment for "How Is It Possible That The Exception Is Null Inside Of A Catch Block?"