verbose terminate handler

Gabriel Dos Reis gdr@integrable-solutions.net
Thu May 27 19:26:00 GMT 2004


"Richter, Jörg" <Joerg.Richter@pdv-FS.de> writes:

| Take a look at this program.
| (Compiled with GCC-3.3.3)
| 
| ---
| #include <exception>
| 
| int main()
| {
|   std::set_terminate( __gnu_cxx::__verbose_terminate_handler );
|   try
|   {
|     throw 1;
|   }
|   catch( ... )
|   {
|     std::terminate();
|   }
| }
| ---
| Outputs:
| terminate called after throwing a `int'
  ^^^^^^^^^

This really should be "std::terminate".


| I wouldn't expect this output. Actually the exception is catched before the program terminates. 
| Is this the intented behavior?

No.  It is not a feature.

-- Gaby



More information about the Libstdc++ mailing list