Boost logo

Boost :

From: Paul C. Kunysch (Illume_at_[hidden])
Date: 2001-05-15 09:49:05


(from a comment in conversions.cpp:)
 re-toss the current exception so we can find out what type it is.
 NOTE: a heinous bug in MSVC6 causes exception objects re-thrown in
 this way to be double-destroyed. Thus, you must only use objects that
 can tolerate double-destruction with that compiler. Metrowerks
 Codewarrior doesn't suffer from this problem.

How can I derive a class from std::runtime_error (or should I
use std::exception?) and make it "double-destructible"?

Does it matter how the "what-string" is allocated or which
constructor is called?

(The MSVC version of std::exception has a member "int _m_doFree;".
 I suppose this means that it tries to free the "_m_what" string
 under certain circumstances and this crashes when the exception
 is destroyed twice. I couldn't find the implementation of
 std::exception::~exception() anywhere, and the documentation
 seems to be useless to me.)


Boost list run by bdawes at, gregod at, cpdaniel at, john at