rename reference of `RangeError` to `RangeDefect` (#5902)
`RangeError` got deprecated in favor of `RangeDefect`. Update handbook.
This commit is contained in:
parent
403568cd2b
commit
9cd6b270df
|
@ -30,7 +30,7 @@ It is the preferred type to represent binary blobs, i.e. we use `seq[byte]` over
|
||||||
|
|
||||||
Nim allows defining ranges of valid value which will be runtime checked everytime the value changes for example
|
Nim allows defining ranges of valid value which will be runtime checked everytime the value changes for example
|
||||||
Nim defines by default `type Natural = range[0 .. high(int)]`. If the value of a Natural becomes less than 0
|
Nim defines by default `type Natural = range[0 .. high(int)]`. If the value of a Natural becomes less than 0
|
||||||
an RangeError exception will be thrown.
|
a `RangeDefect` will be thrown.
|
||||||
|
|
||||||
This is valuable to catch / prevent underflows.
|
This is valuable to catch / prevent underflows.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue