mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
More careful with json errors
This commit is contained in:
parent
d8da295e40
commit
b42316a275
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user