This commit is contained in:
Araq
2019-05-06 14:56:49 +02:00
parent 4032726e87
commit a85d387928

View File

@@ -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)