Remove errorban from public api

Reason: pushing pragmas in included files can have
unexpected side-effects.
This commit is contained in:
Mark Spanbroek 2021-04-12 16:05:31 +02:00
parent 3e92c35a85
commit e66cd2439b
2 changed files with 2 additions and 14 deletions

View File

@ -189,20 +189,6 @@ Any Result can be converted to an Option:
let converted = works().option # equals @[1, 1, 2, 2, 2].some
```
Banning Errors
--------------
Should you decide to use Options and Results instead of the standard exception
handling in Nim, you may want to check that your procs are not accidently
raising errors. You can use the following include for this:
```nim
include questionable/errorban
```
Proc definitions below the error ban are checked by the compiler to ensure that
they do not raise errors.
[1]: https://nim-lang.org/docs/options.html
[2]: https://github.com/arnetheduck/nim-result
[3]: https://github.com/nim-lang/nimble

View File

@ -1,3 +1,5 @@
{.warning: "errorban is deprecated; use nimble package `upraises` instead".}
## Include this file to indicate that your module does not raise Errors.
## Disables compiler hints about unused declarations in Nim < 1.4.0