On Sun, 12 Oct 2008 21:50:53 +0200, "Adem"
<fo***********@alicewho.comwrote:
>Can one get for example the line number where the
unknown exception was thrown?
Here's one creative approach...
1. Make damn sure you have a safe unmodified copy of the original
source. Visual differencing tools are also likely to come in
handy.
On Windows, I'd just make a temporary subversion repository and
commit the original sources, using TortoiseSVN. That makes it easy
to diff any changes I make in the working copy.
2. Search all files, and replace every throw with some other code,
such as printing the value of __LINE__ then exiting. Anything
along those lines - the details will depend on the platform and
the application.
3. Run, check the exception that gets thrown, and restore each
exception throw when you're sure it's not the problem (exceptions
are not always errors, or at least they may already be handled
correctly).
You're far better off with a debugger, but this kind of approach can
help at times.
BTW - commenting out your catch(...) blocks may also help when
debugging. It converts a caught exception into an uncaught one, which
the debugger is more likely to break at by default.