mirror of
https://github.com/vacp2p/nim-quic.git
synced 2026-01-09 22:08:09 -05:00
12 lines
310 B
Nim
12 lines
310 B
Nim
type
|
|
QuicDefect* = object of Defect
|
|
QuicConfigError* = object of CatchableError
|
|
QuicError* = object of IOError
|
|
ClosedStreamError* = object of QuicError
|
|
|
|
template errorAsDefect*(body): untyped =
|
|
try:
|
|
body
|
|
except CatchableError as error:
|
|
raise (ref QuicDefect)(msg: error.msg, parent: error)
|