From: Kevin S. Van Horn (Kevin.VanHorn_at_[hidden])
Date: 2002-11-04 10:35:55
Beman Dawes writes:
> Surely your debugger allows you to trap the exception at the point it is
> thrown, so that the stack (and everything else) at that point is
> available for inspection? Isn't that equivalent to getting a core dump, yet
> preserves the benefits of exceptions in non-debugging environments?
Let's think about this.
First of all, I'm generally only going to be running the program under the
debugger *after* I have encountered an error. In regression tests, alpha
testing and beta testing the program is not going to be run under the
Now, suppose I am running the program under a debugger. Yes, I can set
individual breakpoints for all the places where an exception might get
thrown, but this is a tremendous amount of work, and requires an intimate
knowledge of the source code, including libraries written by others (e.g.,
Boost libraries). No, my debugger (gdb) does not have a general facility
for breakpointing every single place an exception is thrown. Even if it
did, this would be unsatisfactory, because I only want to halt and examine
the program state when an exception indicating a logical error is thrown;
I don't want to breakpoint on runtime errors.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk