mirror of
https://github.com/logos-messaging/logos-chat.git
synced 2026-02-28 04:43:07 +00:00
14 lines
250 B
Nim
14 lines
250 B
Nim
import strformat
|
|
|
|
type
|
|
ChatError* = object of CatchableError
|
|
code*: ErrorCode
|
|
context*: string
|
|
|
|
ErrorCode* = enum
|
|
errTypeError
|
|
errWrapped
|
|
|
|
proc `$`*(x: ChatError): string =
|
|
fmt"ChatError(code={$x.code}, context: {x.context})"
|