Tag Info

New answers tagged

1

It depends on how much of a performance hit you can reasonably accept when throwing the exception. If it only happens once, it might not be a big deal. If it happens every line of the file, it could be a huge problem. Normally exceptions are thrown when something happens that you can't do anything about, and execution is stopped.


0

I feel sorry for you that you had to inherit code from people who abuse exceptions to be goto-like statements. I always attempt to catch them when any user input or something beyond my control can happen (ex: IOExceptions), but anything that could be a coding error (ex: NullPointerException) is something I'd try to catch with asserts early in development. ...


1

Depending on your problem and if there is a chance, you are running on linux,I can recommend using strace. There is a nice video. In general it is a low level tool revealing the systemcalls a monitored process does. To trace child processes, there is the option to follow those with -f. A typical call would be strace -p 1234 -f -e file -s 9999. That monitors ...


6

Your best chance would be to run the application with a debugger and set a breakpoint on that line (or the constructor of ConfusingException). Edit: It is possible to set a break point even in 3rd part applications when source may be unavailable. As in this case in the method or ConfusingException as suggested here.



Top 50 recent answers are included