This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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().
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |