Add a common interface for producing better error messages

This commit is contained in:
Zahary Karadjov 2019-03-20 01:44:30 +02:00
parent c13420f1d0
commit 3a2595be94
1 changed files with 3 additions and 0 deletions

View File

@ -2,3 +2,6 @@ type
SerializationError* = object of CatchableError
UnexpectedEofError* = object of SerializationError
method formatMsg*(err: ref SerializationError, filename: string): string {.base.} =
"Serialisation error while processing " & filename