On Apr 30, 12:43 pm, "Martin T." <0xCDCDC...@[EMAIL PROTECTED]
> wrote:
> Hi all,
>
> I'm currently trying to come up with a decent exception base class for
> some modules of ours and was thinking about adding exception-chaining
> (yes, like in Java :-)
> The following points where im****tant for me:
> * Must inherit from std::exception
> * Should allow for a std::exception to be the start of the exception
chain.
> * throw by value / catch by const reference
>
> As exception chaining seems to be rather obscure with C++, I'm
> interested what other think about the solution (find code below).
>
> thanks,
> br,
> Martin
>
Martin,
I'm wondering what's the value of having such chained exceptions
besides being able to print the [imprecise] call stack? Then you
don't event use __FILE__/__LINE__, so unless I'm missing something
obvious, I see no point in all this additional work.
--
Nikolai
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|