X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.h;h=c53e76b4acba1d5fc297bb976a67398c554040b3;hb=fc399c5aab38ad24ea5d57552701411b4d805181;hp=93fad6de074a72a0df994e9f2281ba1415f0afba;hpb=0bfd6ea8a50ca866039ce1eabdb8df2b3a0330b1;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.h b/kernel/src/bbtkInterpreter.h index 93fad6d..c53e76b 100644 --- a/kernel/src/bbtkInterpreter.h +++ b/kernel/src/bbtkInterpreter.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.h,v $ $ Language: C++ - Date: $Date: 2008/03/21 11:44:37 $ - Version: $Revision: 1.19 $ + Date: $Date: 2008/03/21 14:59:39 $ + Version: $Revision: 1.20 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -53,6 +53,33 @@ namespace bbtk }; + /// + class BBTK_EXPORT InterpreterError : public Exception + { + public: + InterpreterError( const std::string& message, + bool in_script_file, + const std::string& script_file, + int script_line + ); + InterpreterError( const Exception& excep, + bool in_script_file, + const std::string& script_file, + int script_line + ); + ~InterpreterError() throw() {} + + bool IsInScriptFile() const { return mInScriptFile; } + const std::string& GetScriptFile() const { return mScriptFile; } + int GetScriptLine() const { return mScriptLine; } + private: + bool mInScriptFile; + std::string mScriptFile; + int mScriptLine; + }; + + + /// class BBTK_EXPORT Interpreter { @@ -231,6 +258,11 @@ namespace bbtk void LoadScript( std::string fullPathScriptName, std::string includeScriptName); + /// + void CatchBbtkException( const bbtk::Exception& e ); + void CatchStdException( const std::exception& e ); + void CatchUnknownException(); + private: //==================================================================