mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-27 02:03:06 +00:00
17 lines
343 B
Nim
17 lines
343 B
Nim
|
|
|
||
|
|
import
|
||
|
|
std/json
|
||
|
|
import
|
||
|
|
json_signal_event
|
||
|
|
|
||
|
|
type JsonErrorEvent* = ref object of JsonSignal
|
||
|
|
message*: string
|
||
|
|
|
||
|
|
proc new*(T: type JsonErrorEvent,
|
||
|
|
message: string): T =
|
||
|
|
return JsonErrorEvent(
|
||
|
|
eventType: "error",
|
||
|
|
message: message)
|
||
|
|
|
||
|
|
method `$`*(jsonError: JsonErrorEvent): string =
|
||
|
|
$( %* jsonError )
|