]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreter.cxx
#3512 clean bbs2 python version
[bbtk.git] / kernel / src / bbtkInterpreter.cxx
index e57717e08a78c3297dd7d34992603ee6cb47ae38..a1a0fd10793034b4745c4196f39cf6050833be00 100644 (file)
@@ -97,23 +97,16 @@ namespace bbtk
   //=======================================================================
   void Interpreter::Init(VirtualExec::Pointer e, const std::string& cpp_file) 
   {
-    if (e)
-      {
-       mVirtualExecuter = e;
-      }
-    else if (cpp_file.size()!=0)
-      {
-       mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(bbtk::Transcriptor::New(cpp_file));
-      }
-    else 
-      {
-       bbtk::Executer::Pointer exe = bbtk::Executer::New();
-       mRealExecuter = exe;
-       mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(exe);
+    if (e) {
+               mVirtualExecuter = e;
+    } else if (cpp_file.size()!=0){
+               mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(bbtk::Transcriptor::New(cpp_file));
+    } else  {
+               bbtk::Executer::Pointer exe = bbtk::Executer::New();
+               mRealExecuter = exe;
+               mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(exe);
       }
 
-         
-         
     // Lock this pointer or will auto-destruct !!
     if (!e) mVirtualExecuter->SetInterpreter(MakePointer(this,true));
 
@@ -1577,7 +1570,11 @@ void Interpreter::commandHelp(const std::vector<std::string>& words)
     CommandDictType::iterator c;
     c = mCommandDict.find(s);
     if ( c == mCommandDict.end() ) {
-      bbtkError(s<<" : Unknown command");
+
+//EED 2016-12-22
+//      bbtkError(s<<" : Unknown command");
+     std::string tmpSS=s+" : Unknown command";
+      bbtkError(tmpSS);
     }  
     //    std::cout << " " << s << " : "<<  std::endl;
     //    CommandParamDictType::iterator i;