panicoverride.nim 321 B

123456789101112131415
  1. # panicoverride.nim
  2. proc printf(fmt: cstring) {.varargs, importc, header:"stdio.h".}
  3. proc exit(code: cint) {.importc, header:"stdlib.h".}
  4. {.push stack_trace: off, profiler:off.}
  5. proc rawoutput(s: cstring) =
  6. printf("RAW: %s\n", s)
  7. proc panic(s: cstring) {.noreturn.} =
  8. printf("PANIC: %s\n", s)
  9. exit(0)
  10. {.pop.}