Mercurial > code > home > repos > homeauto
view service/iot2/esp32_main/panicoverride.nim @ 1745:d90cb7c06f15
try to crash if mqtt doesn't connect
author | drewp@bigasterisk.com |
---|---|
date | Thu, 09 Nov 2023 17:21:59 -0800 |
parents | 17ff9322328b |
children |
line wrap: on
line source
proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.} proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.} {.push stack_trace: off, profiler:off.} proc rawoutput(s: string) = printf("%s\n", s) proc panic(s: string) = rawoutput(s) exit(1) {.pop.}