blob: 1b91789bd708b5149f9dcc9b2905ee48c2e79f87 (
plain) (
tree)
|
|
# imported by other modules, unlike helpers.nim which is included
template formatErrorIndexBound*[T](i, a, b: T): string =
when defined(standalone):
"indexOutOfBounds"
else:
if b < a: "index out of bounds, the container is empty"
else: "index " & $i & " not in " & $a & " .. " & $b
template formatErrorIndexBound*[T](i, n: T): string =
formatErrorIndexBound(i, 0, n)
|