Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/09/10 12:01:46 $
- Version: $Revision: 1.70 $
+ Date: $Date: 2008/10/02 07:43:20 $
+ Version: $Revision: 1.71 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
info.argmin = 1;
info.argmax = 2;
info.code = cExec;
- info.syntax = "exec <box | 'freeze' | 'unfreeze' >";
- info.help = "Executes the black box of name <box> (and connected boxes if needed). If the special keyword 'freeze' is given then freezes any further execution command. 'unfreeze' reverts to normal execution mode.";
+ info.syntax = "exec <box | 'freeze' | 'unfreeze' | 'freeze_no_error' >";
+ info.help = "Executes the black box of name <box> (and connected boxes if needed). If the special keyword 'freeze' is given then freezes any further execution command. 'unfreeze' reverts to normal execution mode. 'freeze_no_error' is like freeze but also skips any error.";
mCommandDict[info.keyword] = info;
info.keyword = "package";
}
else
{
+ std::cout << "!!!HERRR bbtk"<<std::endl;
std::stringstream mess;
mess << "* ERROR : "<<e.GetMessage()<<std::endl;
if (mFileName.size()) {
}
else
{
+ std::cout << "!!!HERRR std"<<std::endl;
std::stringstream mess;
mess << "* ERROR : "<<e.what()<<std::endl;
if (mFileName.size()) {
}
else
{
+ std::cout << "!!!HERRRunk "<<std::endl;
std::stringstream mess;
mess << "* UNDEFINED ERROR (not a bbtk nor a std exception)"
<< std::endl;
{
str.erase(size-1,1);
}
-
- InterpretLine(str, insideComment);
+ try
+ {
+ InterpretLine(str, insideComment);
+ }
+ CATCH_MACRO;
}//while
CloseCurrentFile();
{
str.erase(size-1,1);
}
-
- InterpretLine(str, insideComment);
-
+ try
+ {
+ InterpretLine(str, insideComment);
+ }
+ CATCH_MACRO;
}//while
-
CloseCurrentFile();
}
}
case cExec :
if (words[1]=="freeze")
- mVirtualExecuter->SetNoExecMode(true);
- else if (words[1]=="unfreeze")
- mVirtualExecuter->SetNoExecMode(false);
- else
- mVirtualExecuter->Execute(words[1]);
+ {
+ mVirtualExecuter->SetNoExecMode(true);
+ mThrow = false;
+ }
+ else if (words[1]=="freeze_no_error ")
+ {
+ mVirtualExecuter->SetNoExecMode(true);
+ mVirtualExecuter->SetNoErrorMode(true);
+ mThrow = false;
+ }
+ else if (words[1]=="unfreeze")
+ {
+ mVirtualExecuter->SetNoExecMode(false);
+ mVirtualExecuter->SetNoErrorMode(false);
+ }
+ else
+ {
+ mVirtualExecuter->Execute(words[1]);
+ }
break;
case cInput :