Let a subscript out of range be catchable from chaiscript

This commit is contained in:
Jason Turner 2014-08-26 08:51:02 -06:00
parent f546e46582
commit 9b7e4d2e78

View File

@ -584,9 +584,6 @@ namespace chaiscript
params.clear(); params.clear();
retval = t_ss.call_function("[]", retval, p1); 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){ catch(const exception::dispatch_error &e){
throw exception::eval_error("Can not find appropriate array lookup operator '[]'.", e.parameters, e.functions, false, t_ss ); 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 { try {
retval = t_ss.call_function("[]", retval, this->children[i]->children[j]->eval(t_ss)); 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){ catch(const exception::dispatch_error &e){
throw exception::eval_error("Can not find appropriate array lookup operator '[]'.", e.parameters, e.functions, true, t_ss); throw exception::eval_error("Can not find appropriate array lookup operator '[]'.", e.parameters, e.functions, true, t_ss);
} }