From 7dea96c3fd3343fc15372ae61573ad5354b19ffc Mon Sep 17 00:00:00 2001 From: guigues Date: Wed, 26 Nov 2008 12:36:42 +0000 Subject: [PATCH] Fixed the systematic '* LINE : 0' bug when error in script --- kernel/src/bbtkInterpreter.cxx | 31 +++++++++++++++++++++++++++++-- kernel/src/bbtkInterpreter.h | 5 +++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index d112f73..4b2e866 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:13 $ - Version: $Revision: 1.77 $ + Date: $Date: 2008/11/26 12:36:42 $ + Version: $Revision: 1.78 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -396,6 +396,28 @@ namespace bbtk mScriptLine(script_line) { } + //======================================================================= + void Interpreter::CatchInterpreterException( const InterpreterError& e ) + { + if (mThrow) + { + CloseAllFiles(); + throw InterpreterError(e); + } + else + { + std::stringstream mess; + mess << "* ERROR : "<