Print custom exception names

This commit is contained in:
Mamy André-Ratsimbazafy 2019-03-29 13:49:47 +01:00
parent 24191689fa
commit 3cb55e7057
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ method formatMsg*(err: ref UnexpectedToken, filename: string): string =
fmt"{filename}({err.line}, {err.col}) Unexpected token '{err.encountedToken}' in place of '{err.expectedToken}'"
method formatMsg*(err: ref CustomSerializationError, filename: string): string =
fmt"{filename}({err.line}, {err.col}) Error while deserializing '{err.deserializedField}': {err.innerException.msg}"
fmt"{filename}({err.line}, {err.col}) Custom serialization exception while deserializing '{err.deserializedField}': [{err.innerException.name}] {err.innerException.msg}"
template init*(T: type JsonReader, stream: ByteStreamVar, mode = defaultJsonMode): auto =
init JsonReader, AsciiStreamVar(stream), mode