view service/iot2/esp32_main/panicoverride.nim @ 1700:11bd81eda1ef

release 0.12.0
author drewp@bigasterisk.com
date Tue, 12 Oct 2021 20:18:59 -0700
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.}