mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-02-16 20:13:26 +00:00
16 lines
278 B
Nim
16 lines
278 B
Nim
import strformat
|
|
|
|
type
|
|
ChatError* = object of CatchableError
|
|
code*: ErrorCode
|
|
context*: string
|
|
|
|
ErrorCode* = enum
|
|
errTypeError
|
|
errWrapped
|
|
errTopic
|
|
errLibChat
|
|
|
|
proc `$`*(x: ChatError): string =
|
|
fmt"ChatError(code={$x.code}, context: {x.context})"
|