nim-chat-poc/src/chat/errors.nim

16 lines
278 B
Nim
Raw Normal View History

import strformat
type
ChatError* = object of CatchableError
code*: ErrorCode
context*: string
ErrorCode* = enum
errTypeError
errWrapped
2025-12-04 11:51:34 +08:00
errTopic
2026-02-11 09:59:10 -08:00
errLibChat
proc `$`*(x: ChatError): string =
fmt"ChatError(code={$x.code}, context: {x.context})"