Better default JsonReaderError.formatMsg implementation
This commit is contained in:
parent
a12beabd2f
commit
461fd03edb
|
@ -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].} =
|
||||
|
|
Loading…
Reference in New Issue