Fix failing error reporting for solitary (non-dispatched) guarded function

This commit is contained in:
Jason Turner
2012-06-25 07:53:15 -06:00
parent 5e6a51ba63
commit 7a25625fdd

View File

@@ -239,6 +239,9 @@ namespace chaiscript
catch(const exception::arity_error &e){ catch(const exception::arity_error &e){
throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'"); 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) { catch(detail::Return_Value &rv) {
return rv.retval; return rv.retval;
} }
@@ -302,6 +305,9 @@ namespace chaiscript
catch(const exception::arity_error &e){ catch(const exception::arity_error &e){
throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'"); 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) { catch(detail::Return_Value &rv) {
return rv.retval; return rv.retval;
} }