]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreterVirtual.cxx
#3480 Bug typeid in Macos
[bbtk.git] / kernel / src / bbtkInterpreterVirtual.cxx
index c1a6fac6a6a6a1b7bb4ee0998d08822244b7e431..451ade9e45cabbbfea1285770f41f77aa45bec28 100644 (file)
@@ -346,7 +346,6 @@ namespace bbtk
     */
 
 
-
   } 
   //=======================================================================
   
@@ -517,6 +516,7 @@ namespace bbtk
   //=======================================================================
   void InterpreterVirtual::CatchUnknownException()
   {
+printf("EED InterpreterVirtual::CatchUnknownException Start\n");
 //EED Borrame   if (GetExecuter()->GetNoErrorMode()) 
 //EED Borrame       {
 //EED Borrame  std::string file("?");
@@ -557,27 +557,28 @@ namespace bbtk
        CloseAllFiles();
        std::cerr << mess.str();
       }
+printf("EED InterpreterVirtual::CatchUnknownException End\n");
   }
   //=======================================================================
 
   //=======================================================================
   
-#define CATCH_MACRO                                    \
-  catch (InterpreterException e)                       \
-    {                                                  \
-      CatchInterpreterException(e);                    \
-    }                                                  \
+#define CATCH_MACRO                                            \
+  catch (InterpreterException e)               \
+    {                                                                  \
+      CatchInterpreterException(e);            \
+    }                                                                  \
   catch (bbtk::Exception e)                            \
-    {                                                  \
-      CatchBbtkException(e);                           \
-    }                                                  \
+    {                                                                  \
+      CatchBbtkException(e);                   \
+    }                                                                  \
   catch (std::exception& e)                            \
-    {                                                  \
+    {                                                                  \
       CatchStdException(e);                            \
-    }                                                  \
-  catch (...)                                          \
-    {                                                  \
-      CatchUnknownException();                         \
+    }                                                                  \
+  catch (...)                                                  \
+    {                                                                  \
+      CatchUnknownException();                 \
     }                                          
   //=======================================================================
    
@@ -612,8 +613,7 @@ namespace bbtk
 
 
   //=======================================================================
-  InterpreterVirtual::ExitStatus 
-  InterpreterVirtual::InterpretBuffer( std::stringstream* buffer )
+  InterpreterVirtual::ExitStatus   InterpreterVirtual::InterpretBuffer( std::stringstream* buffer )
   {
     bbtkDebugMessage("interpreter",4,"==> InterpreterVirtual::InterpretBuffer()"<<std::endl);
 
@@ -634,6 +634,7 @@ namespace bbtk
 
     
     mCommandLine = exm;
+
     return mStatus;
   }
   //=======================================================================
@@ -804,8 +805,7 @@ namespace bbtk
        
   //=======================================================================  
   void InterpreterVirtual::DoInterpretLine( const std::string& line )
-  {
-         
+  {  
     bbtkDebugMessage("interpreter",6,"==> InterpreterVirtual::DoInterpretLine(\""
                     <<line<<"\")"<<std::endl);
     std::vector<std::string> words;
@@ -1128,7 +1128,7 @@ namespace bbtk
 
     bbtkDebugMessage("interpreter",6,"<== InterpreterVirtual::DoInterpretLine(\""
                     <<line<<"\")"<<std::endl);
-         
+
   }
   //=======================================================================  
 
@@ -1338,7 +1338,6 @@ namespace bbtk
                 i++)
              {
                std::string full_path(*i);
-printf("EED InterpreterVirtual::SwitchToFile 1. >>%s\n", full_path.c_str() );
                // we *really* want '.' to be the current working directory
                if (full_path == ".") 
                  {
@@ -1369,8 +1368,6 @@ printf("EED InterpreterVirtual::SwitchToFile 1. >>%s\n", full_path.c_str() );
        std::vector<std::string>::iterator i;
        for (i=script_paths.begin();i!=script_paths.end();i++)
          {
-
-printf("EED InterpreterVirtual::SwitchToFile jaja >>  %s\n", (*i).c_str() );
                  
            bbtkMessage("interpreter",1,
                        "--> Looking in '" << *i << "'" << std::endl);
@@ -1403,9 +1400,6 @@ printf("EED InterpreterVirtual::SwitchToFile jaja >>  %s\n", (*i).c_str() );
            for (std::vector<std::string>::iterator j = Filenames.begin(); 
                 j!= Filenames.end(); ++j)
              {
-                         
-printf("EED InterpreterVirtual::SwitchToFile kkkkk     >>  %s\n", (*j).c_str() );
-                         
                int lgr = (*j).size();
                if (lgr < 5) continue;  
                // ignore non .bbp file
@@ -1561,9 +1555,7 @@ printf("EED InterpreterVirtual::SwitchToFile kkkkk     >>  %s\n", (*j).c_str() )
           bbtkError("No ["<<pkgname<<".bbs/.bbp] script found");
        return;
       } else {
-//EED printf("EED D. SwitchToFile %s\n", fullPathScriptName.c_str() );   
                LoadScript(fullPathScriptName,name);
-//EED Borrame    if (source) GetExecuter()->SetCurrentFileName(fullPathScriptName);
                  if (source) 
                  {
                          // Over writing the fullpath of the bbp file.