Print

Print


Commit in slic/src on MAIN
SlicMain.cc+35-331.3 -> 1.4
revert unwanted changes

slic/src
SlicMain.cc 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- SlicMain.cc	11 Feb 2011 23:32:24 -0000	1.3
+++ SlicMain.cc	11 Feb 2011 23:46:54 -0000	1.4
@@ -1,4 +1,4 @@
-// $Id: SlicMain.cc,v 1.3 2011/02/11 23:32:24 jeremy Exp $
+// $Id: SlicMain.cc,v 1.4 2011/02/11 23:46:54 jeremy Exp $
 
 #include "SlicMain.hh"
 
@@ -11,50 +11,52 @@
 
 namespace slic
 { 
-  SlicMain::SlicMain()
+
+SlicMain::SlicMain()
     : Module( "SlicMain" )
-  {;}
+{;}
 
-  SlicMain::~SlicMain()
-  {;}
+SlicMain::~SlicMain()
+{;}
 
-  int SlicMain::main(int argc, char** argv)
-  {    
+int SlicMain::main(int argc, char** argv)
+{    
     // Default return code.
     int returnCode = 0;
     
     SlicApplication* slicApp = 0;
     
     // Top-level try block.
-    //try 
-    //{     
-      // Create the SLIC application using singleton function.
-      slicApp = SlicApplication::instance();
-      
-      // Setup the command line arguments.
-      slicApp->initialize(argc, argv);
-      
-      // Run the simulator.
-      slicApp->run();
-      
-      // Get the application return code.
-      returnCode = slicApp->getReturnCode();
-    //}
+    try 
+    {     
+        // Create the SLIC application using singleton function.
+        slicApp = SlicApplication::instance();
+        
+        // Setup the command line arguments.
+        slicApp->initialize(argc, argv);
+        
+        // Run the simulator.
+        slicApp->run();
+        
+        // Get the application return code.
+        returnCode = slicApp->getReturnCode();
+    }
     // Catch an std::exception.
-    //catch(std::exception& stde) 
-    //{
-    //  log() << LOG::error << stde.what() << LOG::done;
-    //}
+    catch(std::exception& stde) 
+    {
+        log() << LOG::error << stde.what() << LOG::done;
+    }
     // Catch an unknown exception.
-    //catch(...) 
-    //{
-    //  log() << LOG::error << "Top-level catch caught unknown exception!" << LOG::done;
-    //}
-
-    if ( slicApp ) {
-      delete slicApp;
+    catch(...) 
+    {
+        log() << LOG::error << "Top-level catch caught unknown exception!" << LOG::done;
+    }
+    
+    if ( slicApp ) 
+    {
+        delete slicApp;
     }   
     
     return returnCode;
-  }
 }
+} // namespace slic
CVSspam 0.2.8