certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] certi/RTIG main.cc


From: certi-cvs
Subject: [certi-cvs] certi/RTIG main.cc
Date: Sat, 03 May 2008 18:34:18 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/05/03 18:34:18

Modified files:
        RTIG           : main.cc 

Log message:
        Fix bug #23135 : RTIG/RTIA generates no coredump after unhandled 
exception
        (RTIG part only)
        Do not catch all exception then exit(EXIT_FAILURE) this
        is like a "silent die".
        Let RTIG die with a coredump from which we may retrieve the stacktrace.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/main.cc?cvsroot=certi&r1=3.15&r2=3.16

Patches:
Index: main.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/main.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- main.cc     6 Jul 2007 09:25:19 -0000       3.15
+++ main.cc     3 May 2008 18:34:18 -0000       3.16
@@ -38,14 +38,13 @@
 using std::endl ;
 using std::string ;
 
-static RTIG *rti ;
+static RTIG myRTIG;
 
 // ----------------------------------------------------------------------------
 //! SignalHandler.
 extern "C" void SignalHandler(int sig)
 {
-    rti->signalHandler(sig);
-
+    myRTIG.signalHandler(sig);
     // Catch signal again.
     std::signal(sig, SignalHandler);
 }
@@ -94,19 +93,11 @@
 
     std::set_new_handler(NewHandler);
 
-    try {
-        rti = new RTIG();
-       rti->setVerbose(args.verbose_flag);
-        rti->execute();
-        delete rti ;
-    }
-    catch (Exception &e) {
-        cerr << "RTIG: exception: " << e._name << " -- Exiting." << endl ;
-        exit(EXIT_FAILURE);
-    }
+    myRTIG.setVerbose(args.verbose_flag);
+    myRTIG.execute();    
 
     if (verbose) {
        cout << "CERTI RTIG exiting." << endl ;
     }
     exit(EXIT_SUCCESS);
-}
+} /* end of main */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]