summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/system/indexerrors.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system/indexerrors.nim b/lib/system/indexerrors.nim
index cb1d522c9..53c52a26a 100644
--- a/lib/system/indexerrors.nim
+++ b/lib/system/indexerrors.nim
@@ -1,7 +1,10 @@
 # imported by other modules, unlike helpers.nim which is included
 
 template formatErrorIndexBound*[T](i, a, b: T): string =
-  "index " & $i & " not in " & $a & " .. " & $b
+  when defined(standalone):
+    "indexOutOfBounds"
+  else:
+    "index " & $i & " not in " & $a & " .. " & $b
 
 template formatErrorIndexBound*[T](i, n: T): string =
   formatErrorIndexBound(i, 0, n)