Move the noreturn pragma to sysFatal

Now you can choose to implement sysFatal with --os:standalone so that it
returns.
This commit is contained in:
def 2015-05-05 20:24:54 +02:00
commit c5db4fc3a2
4 changed files with 20 additions and 19 deletions

View file

@ -9,16 +9,16 @@
# Implementation of some runtime checks.
proc raiseRangeError(val: BiggestInt) {.compilerproc, noreturn, noinline.} =
proc raiseRangeError(val: BiggestInt) {.compilerproc, noinline.} =
when hostOS == "standalone":
sysFatal(RangeError, "value out of range")
else:
sysFatal(RangeError, "value out of range: ", $val)
proc raiseIndexError() {.compilerproc, noreturn, noinline.} =
proc raiseIndexError() {.compilerproc, noinline.} =
sysFatal(IndexError, "index out of bounds")
proc raiseFieldError(f: string) {.compilerproc, noreturn, noinline.} =
proc raiseFieldError(f: string) {.compilerproc, noinline.} =
sysFatal(FieldError, f, " is not accessible")
proc chckIndx(i, a, b: int): int =