add parent error to parseJson exceptions

This commit is contained in:
Eric 2024-02-08 17:01:38 +11:00
parent bcabc173d4
commit 6522b219f8
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -11,4 +11,4 @@ proc parseJson*(json: string): ?!JsonNode =
try:
return stdjson.parseJson(json).catch
except Exception as e:
return failure newException(JsonParseError, e.msg)
return failure newException(JsonParseError, e.msg, e)