refs #9880 show index and bound in lots of index out of bounds errors

This commit is contained in:
Timothee Cour 2018-12-06 15:42:44 -08:00
commit f3ecc15a94
9 changed files with 64 additions and 23 deletions

5
lib/system/helpers2.nim Normal file
View file

@ -0,0 +1,5 @@
template formatErrorIndexBound*[T](i, a, b: T): string =
"index out of bounds: (a:" & $a & ") <= (i:" & $i & ") <= (b:" & $b & ") "
template formatErrorIndexBound*[T](i, n: T): string =
"index out of bounds: (i:" & $i & ") <= (n:" & $n & ") "