From 3aa48f58f309daa621043d52ff046c5b16c656cf Mon Sep 17 00:00:00 2001 From: MichelJuillard <michel.juillard@mjui.fr> Date: Mon, 14 Nov 2022 18:34:14 +0100 Subject: [PATCH] add class for exceptions --- src/DataTree.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/DataTree.hh b/src/DataTree.hh index b6416139..c0ad2ec9 100644 --- a/src/DataTree.hh +++ b/src/DataTree.hh @@ -142,13 +142,17 @@ public: expr_t MinusOne, MinusInfinity; //! Raised when a local parameter is declared twice - struct LocalVariableException + class LocalVariableException { + public: string name; + LocalVariableException(str name_arg) : name(name_arg) {} }; class DivisionByZeroException { + public: + DivisionByZeroException() {} }; inline expr_t AddPossiblyNegativeConstant(double val); @@ -284,6 +288,8 @@ public: //! Thrown when trying to access an unknown variable by deriv_id class UnknownDerivIDException { + public: + UnknownDerivIDException() {} }; //! Raised when a trend is declared twice -- GitLab