This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: verbose terminate handler


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]