aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/json-to-value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/json-to-value.cc')
-rw-r--r--src/libexpr/json-to-value.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc
index 3f6017957..8bae986f9 100644
--- a/src/libexpr/json-to-value.cc
+++ b/src/libexpr/json-to-value.cc
@@ -111,9 +111,9 @@ static void parseJSON(EvalState & state, const char * & s, Value & v)
mkFloat(v, stod(tmp_number));
else
mkInt(v, stol(tmp_number));
- } catch (std::invalid_argument e) {
+ } catch (std::invalid_argument & e) {
throw JSONParseError("invalid JSON number");
- } catch (std::out_of_range e) {
+ } catch (std::out_of_range & e) {
throw JSONParseError("out-of-range JSON number");
}
}