From 7a25625fddc1fe3fc402ebff5a45cd5153276017 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 25 Jun 2012 07:53:15 -0600 Subject: [PATCH] Fix failing error reporting for solitary (non-dispatched) guarded function --- include/chaiscript/language/chaiscript_eval.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/chaiscript/language/chaiscript_eval.hpp b/include/chaiscript/language/chaiscript_eval.hpp index 66a34c72..4d211472 100644 --- a/include/chaiscript/language/chaiscript_eval.hpp +++ b/include/chaiscript/language/chaiscript_eval.hpp @@ -239,6 +239,9 @@ namespace chaiscript catch(const exception::arity_error &e){ throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'"); } + catch(const exception::guard_error &e){ + throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'"); + } catch(detail::Return_Value &rv) { return rv.retval; } @@ -302,6 +305,9 @@ namespace chaiscript catch(const exception::arity_error &e){ throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'"); } + catch(const exception::guard_error &e){ + throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'"); + } catch(detail::Return_Value &rv) { return rv.retval; }