Re: Exception thrown from multithreaded shared lib not caught in main

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

void Lixo::lib_func() throw()
{
   throw Lixo::ValidationException("Hello!");
}

The above code, will result in a call to std::unexpected() and thus to std::terminare() and from there abort() resulting in the application exiting without the stack unwinding to main().

By specifying that the method 'lib_func()' throws nothing 'throw()' any thrown exception (because they are all unexpected) should generate a call to std::unexpected().



That was it! Silly me... :$

Thanks for the reminder, and to Lyle for also having a look.

João Luis

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux