summary refs log tree commit diff stats
path: root/lib/system/chcks.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/chcks.nim')
-rw-r--r--lib/system/chcks.nim16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/system/chcks.nim b/lib/system/chcks.nim
index 387b54ef1..5c32a307a 100644
--- a/lib/system/chcks.nim
+++ b/lib/system/chcks.nim
@@ -1,6 +1,6 @@
 #
 #
-#            Nimrod's Runtime Library
+#            Nim's Runtime Library
 #        (c) Copyright 2013 Andreas Rumpf
 #
 #    See the file "copying.txt", included in this
@@ -13,13 +13,13 @@ proc raiseRangeError(val: BiggestInt) {.compilerproc, noreturn, noinline.} =
   when hostOS == "standalone":
     sysFatal(EOutOfRange, "value out of range")
   else:
-    sysFatal(EOutOfRange, "value out of range: ", $val)
+    sysFatal(RangeError, "value out of range: ", $val)
 
 proc raiseIndexError() {.compilerproc, noreturn, noinline.} =
-  sysFatal(EInvalidIndex, "index out of bounds")
+  sysFatal(IndexError, "index out of bounds")
 
 proc raiseFieldError(f: string) {.compilerproc, noreturn, noinline.} =
-  sysFatal(EInvalidField, f, " is not accessible")
+  sysFatal(FieldError, f, " is not accessible")
 
 proc chckIndx(i, a, b: int): int =
   if i >= a and i <= b:
@@ -46,11 +46,11 @@ proc chckRangeF(x, a, b: float): float =
     when hostOS == "standalone":
       sysFatal(EOutOfRange, "value out of range")
     else:
-      sysFatal(EOutOfRange, "value out of range: ", $x)
+      sysFatal(RangeError, "value out of range: ", $x)
 
 proc chckNil(p: pointer) =
   if p == nil:
-    sysFatal(EInvalidValue, "attempt to write to a nil address")
+    sysFatal(ValueError, "attempt to write to a nil address")
     #c_raise(SIGSEGV)
 
 proc chckObj(obj, subclass: PNimType) {.compilerproc.} =
@@ -59,13 +59,13 @@ proc chckObj(obj, subclass: PNimType) {.compilerproc.} =
   if x == subclass: return # optimized fast path
   while x != subclass:
     if x == nil:
-      sysFatal(EInvalidObjectConversion, "invalid object conversion")
+      sysFatal(ObjectConversionError, "invalid object conversion")
       break
     x = x.base
 
 proc chckObjAsgn(a, b: PNimType) {.compilerproc, inline.} =
   if a != b:
-    sysFatal(EInvalidObjectAssignment, "invalid object assignment")
+    sysFatal(ObjectAssignmentError, "invalid object assignment")
 
 type ObjCheckCache = array[0..1, PNimType]