Stewart Stremler wrote:
I'm coming from a project with 4,500+ C++ source files that used
ACE/TAO (which is even bigger).  Maintaining someone else's C++
code (in anger) is where I'm coming from.
Yup. ACE/TAO are from another era of C++ development. All kinds of ugliness there. It's the kind of thing that drove people away from the language (and ACE/TAO are about as good as C++ in that era ever got).
Let me emphasize the "unknown" part: it's an UNKNOWN exception. I don't
know what code is throwing the exception. It's not code that I've
written or looked at. If I was the one throwing the exception, I'd know
how to catch it, and I wouldn't be using catch (...), and all would be
gravy.  But I'm not, so I don't, thus I must, and it ain't.
You should be able to catch "std::exception", and if it still slips by you probably should just let it core dump, do a stack trace, and send hate mail to whomever is responsible for the throw. There is no excuse for deriving from something else.
Instead, I have to hope I can code up a test that gives the exception,
and then drop a breakpoint on the try (or, if I've been silly and
failed to emite __FILE__ and __LINE__ information in my complaint,
on a number of the catch (...) statements), and then futz with the
debugger until I see the throw.

And then hope it isn't "catch (...) { throw SOME_CONSTANT; }" or
equivalent.

Tedious, boring, mind-numbing work.... just to get to the point where
you can *start* the debugging process.
Ugh. That sounds like poor tools. Perhaps an old version of g++?

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to