
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Andreas Huber Sent: Tuesday, July 18, 2006 10:05 PM Subject: Re: [boost] Exception Visitor
// Untested code #include <stdexcept>
// Generic handler function void HandleException() { try { throw; } catch (const std::logic_error &) { // whatever } catch (const std::exception &) { // whatever } }
int main() { try { // throwing code } catch (...) { HandleException(); }
return 0; }
If you forget to handle a relevant exception in HandleException, is your debugger able to show you the 'right' backtrace (i.e. where the exception really occurred)? I don't think the op's idea has that problem. cheers, aa -- Andreas Ames | Programmer | Comergo GmbH | Voice: +49 69 7505 3213 | ames AT avaya DOT com