From 9b7e4d2e7828797bd3bbfa79ba2a21deadd18fca Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 26 Aug 2014 08:51:02 -0600 Subject: [PATCH] Let a subscript out of range be catchable from chaiscript --- include/chaiscript/language/chaiscript_eval.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/chaiscript/language/chaiscript_eval.hpp b/include/chaiscript/language/chaiscript_eval.hpp index f2e2391d..f40a9fc9 100644 --- a/include/chaiscript/language/chaiscript_eval.hpp +++ b/include/chaiscript/language/chaiscript_eval.hpp @@ -584,9 +584,6 @@ namespace chaiscript params.clear(); retval = t_ss.call_function("[]", retval, p1); } - catch(std::out_of_range &) { - throw exception::eval_error("Out of bounds exception"); - } catch(const exception::dispatch_error &e){ throw exception::eval_error("Can not find appropriate array lookup operator '[]'.", e.parameters, e.functions, false, t_ss ); } @@ -662,9 +659,6 @@ namespace chaiscript try { retval = t_ss.call_function("[]", retval, this->children[i]->children[j]->eval(t_ss)); } - catch(std::out_of_range &) { - throw exception::eval_error("Out of bounds exception"); - } catch(const exception::dispatch_error &e){ throw exception::eval_error("Can not find appropriate array lookup operator '[]'.", e.parameters, e.functions, true, t_ss); }