More careful with json errors

This commit is contained in:
Jason Turner 2017-07-19 13:19:17 -06:00
parent d8da295e40
commit b42316a275

View File

@ -65,7 +65,7 @@ namespace chaiscript
{ {
try { try {
return from_json( json::JSON::Load(t_json) ); return from_json( json::JSON::Load(t_json) );
} catch (...) { } catch (const std::out_of_range& ) {
throw std::runtime_error("Unparsed JSON input"); throw std::runtime_error("Unparsed JSON input");
} }
} }