Logo Search packages:      
Sourcecode: launchtool version File versions  Download package

void DefaultUnexpected (  ) 

Basic unexpected handler.

This is an unexpected handler provided by the library. It prints to stderr a stack trace and all possible available informations about the escaped exception.

To have the function names in the stack trace, the executables need to be linked using the -rdynamic flag.

Definition at line 41 of file Exception.cc.

References Exception::desc(), and Exception::type().

{
      try {
            fprintf(stderr, "Caught unexpected exception\n");
            throw;
      } catch (Exception& e) {
            fprintf(stderr, "Exception was: %s: %.*s.\n", e.type(), PFSTR(e.desc()));
            throw;
      } catch (exception& e) {
            fprintf(stderr, "Exception was: %s: %s\n", typeid(e).name(), e.what());
            throw;
      } catch (...) {
            fprintf(stderr, "Exception was: unknown object\n");
            throw;
      }
}


Generated by  Doxygen 1.6.0   Back to index