2008/11/15 Bernd Roesch:
>
>>If exceptions are enabled
>> __throw_logic_error will throw std::logic_error, otherwise it will
>> call abort().
>
> On the amigaos compiler is sjlj enabled, i see in asm debugger after
> single
> stepping long it call std::logic_error.but this func do nothing print.
>
> so i simplyfy the testprogram and see std::logic_error("test\n"); does not
> output anything.

The type std::logic_error isn't supposed to print anything, it just
holds a string.

In current versions of GCC the default terminate handler (called when
an exception is not caught) will print out the message, see
__verbose_terminate_handler() in libsupc++/vterminate.cc

Any printing is done by code that handles the exception, not by the
exception itself.

Reply via email to