Better default JsonReaderError.formatMsg implementation

This commit is contained in:
Zahary Karadjov 2022-03-09 18:24:02 +02:00
parent a12beabd2f
commit 461fd03edb
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ template tryFmt(expr: untyped): string =
method formatMsg*(err: ref JsonReaderError, filename: string):
string {.gcsafe, raises: [Defect].} =
tryFmt: fmt"{filename}({err.line}, {err.col}) Error while reading json file"
tryFmt: fmt"{filename}({err.line}, {err.col}) Error while reading json file: {err.msg}"
method formatMsg*(err: ref UnexpectedField, filename: string):
string {.gcsafe, raises: [Defect].} =