mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-05 07:13:09 +00:00
Remove errorban from public api
Reason: pushing pragmas in included files can have unexpected side-effects.
This commit is contained in:
parent
3e92c35a85
commit
e66cd2439b
14
Readme.md
14
Readme.md
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user