]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreter.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkInterpreter.cxx
index 7b5fa779af57647042f24cdfee4c046f7d2d5480..82edfcd775c46d173dc99d500d29f9d0492dfcf0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/20 15:27:56 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2008/03/21 11:44:37 $
+  Version:   $Revision: 1.51 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -307,7 +307,7 @@ bufferNb =0;
     bool exm = mCommandLine;
     mCommandLine = false;
 
-    ExitStatus status = OK;
+    ExitStatus status = Interpreter_OK;
 
   
     try 
@@ -336,7 +336,7 @@ bufferNb =0;
     }
     catch (QuitException e) 
     {
-      status = QUIT;
+      status = Interpreter_QUIT;
       if (mThrow) throw QuitException();
     }
     catch (bbtk::Exception e) 
@@ -347,11 +347,11 @@ bufferNb =0;
          mess << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
          mess << "* LINE  : "<<mLine.back()<<std::endl;
       }    
-      status = ERROR;
+      status = Interpreter_ERROR;
       if (mThrow) 
        throw bbtk::Exception("Interpreter","",mess.str());
       else
-       std::cerr << mess;
+       std::cerr << mess.str();
 
     }
     catch (std::exception& e) 
@@ -362,11 +362,11 @@ bufferNb =0;
           mess << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
           mess << "* LINE  : "<<mLine.back()<<std::endl;
        }  
-      status = ERROR;
+      status = Interpreter_ERROR;
       if (mThrow) 
        throw bbtk::Exception("Interpreter","",mess.str());
       else
-       std::cerr << mess;  
+       std::cerr << mess.str();  
     }  
     catch (...)
       {
@@ -377,11 +377,11 @@ bufferNb =0;
           mess << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
           mess << "* LINE  : "<<mLine.back()<<std::endl;
        }    
-       status = ERROR;
+       status = Interpreter_ERROR;
        if (mThrow) 
          throw bbtk::Exception("Interpreter","",mess.str());
        else
-         std::cerr << mess;   
+         std::cerr << mess.str();   
       }
     
     CloseAllFiles();
@@ -407,7 +407,7 @@ bufferNb =0;
     bool exm = mCommandLine;
     mCommandLine = false;
 
-    ExitStatus status = OK;
+    ExitStatus status = Interpreter_OK;
 
     try 
     {
@@ -436,7 +436,7 @@ bufferNb =0;
     }
     catch (QuitException e) 
       { 
-       status = QUIT;
+       status = Interpreter_QUIT;
       }
     catch (bbtk::Exception e) 
       {
@@ -446,7 +446,7 @@ bufferNb =0;
            std::cerr << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
            std::cerr << "* LINE  : "<<mLine.back()<<std::endl;
          }    
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     catch (std::exception& e) 
       {
@@ -456,7 +456,7 @@ bufferNb =0;
            std::cerr << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
            std::cerr << "* LINE  : "<<mLine.back()<<std::endl;
          }    
-       status = ERROR;
+       status = Interpreter_ERROR;
     }  
     catch (...)
       {
@@ -467,7 +467,7 @@ bufferNb =0;
            std::cerr << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
            std::cerr << "* LINE  : "<<mLine.back()<<std::endl;
          }    
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     
     CloseAllFiles();
@@ -485,7 +485,7 @@ bufferNb =0;
   {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine('"<<line<<"')"<<std::endl);
 
-    ExitStatus status = OK;
+    ExitStatus status = Interpreter_OK;
 
     try 
     {
@@ -494,23 +494,23 @@ bufferNb =0;
     }
     catch (QuitException e) 
       { 
-      status = QUIT;
+      status = Interpreter_QUIT;
       }
     catch (bbtk::Exception e) 
       {
        std::cerr << "* ERROR : "<<e.GetMessage()<<std::endl;
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     catch (std::exception& e) 
       {
        std::cerr << "* ERROR : "<<e.what()<<" (not in bbtk)"<<std::endl;
-       status = ERROR;
+       status = Interpreter_ERROR;
     }  
     catch (...)
       {
        std::cerr 
          << "* UNDEFINED ERROR (not a bbtk nor a std exception)"<<std::endl;
-       status = ERROR;
+       status = Interpreter_ERROR;
       }