Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $
Language: C++
- Date: $Date: 2008/12/15 09:04:47 $
- Version: $Revision: 1.81 $
+ Date: $Date: 2009/01/27 14:22:57 $
+ Version: $Revision: 1.82 $
=========================================================================*/
/* ---------------------------------------------------------------------
//=======================================================================
void Interpreter::CatchInterpreterException( const InterpreterException& e )
{
+ if (GetExecuter()->GetNoErrorMode())
+ {
+ bbtkWarning("ERROR :"<<e.GetErrorMessage()
+ <<" ("<<e.GetScriptFile()<<":"<<e.GetScriptLine()
+ <<" skipped");
+
+ return;
+ }
if (mThrow)
{
if (e.GetErrorMessage()!="break")
//=======================================================================
void Interpreter::CatchBbtkException( const bbtk::Exception& e )
{
+ if (GetExecuter()->GetNoErrorMode())
+ {
+ std::string file("?");
+ int line = 0;
+ if (mFileName.size()) {
+ file = mFileName.back();
+ line = mLine.back();
+ }
+ bbtkWarning("ERROR '"<<e.GetErrorMessage()
+ <<"' ("<<file<<":"<<line<<") skipped");
+
+ return;
+ }
mStatus = Interpreter_ERROR;
if (mThrow)
{
//=======================================================================
void Interpreter::CatchStdException( const std::exception& e )
{
+ if (GetExecuter()->GetNoErrorMode())
+ {
+ std::string file("?");
+ int line = 0;
+ if (mFileName.size()) {
+ file = mFileName.back();
+ line = mLine.back();
+ }
+ bbtkWarning("ERROR '"<<e.what()
+ <<"' ("<<file<<":"<<line<<") skipped");
+
+ return;
+ }
mStatus = Interpreter_ERROR;
if (mThrow)
{
//=======================================================================
void Interpreter::CatchUnknownException()
{
+ if (GetExecuter()->GetNoErrorMode())
+ {
+ std::string file("?");
+ int line = 0;
+ if (mFileName.size()) {
+ file = mFileName.back();
+ line = mLine.back();
+ }
+ bbtkWarning("UNDEFINED ERROR "
+ <<"("<<file<<":"<<line<<") skipped");
+ return;
+ }
mStatus = Interpreter_ERROR;
if (mThrow)
{
mVirtualExecuter->SetNoExecMode(true);
mThrow = false;
}
- else if (words[1]=="freeze_no_error ")
+ else if (words[1]=="freeze_no_error")
{
mVirtualExecuter->SetNoExecMode(true);
mVirtualExecuter->SetNoErrorMode(true);