From b42316a27581c5cef8a4b825d78bf7836703ce0f Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Wed, 19 Jul 2017 13:19:17 -0600 Subject: [PATCH] More careful with json errors --- include/chaiscript/utility/json_wrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/chaiscript/utility/json_wrap.hpp b/include/chaiscript/utility/json_wrap.hpp index 6a6ccd02..2aa81f34 100644 --- a/include/chaiscript/utility/json_wrap.hpp +++ b/include/chaiscript/utility/json_wrap.hpp @@ -65,7 +65,7 @@ namespace chaiscript { try { return from_json( json::JSON::Load(t_json) ); - } catch (...) { + } catch (const std::out_of_range& ) { throw std::runtime_error("Unparsed JSON input"); } }