mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-05 08:45:27 +00:00
initial commit
parent
2eb83e62c1
commit
dcbced4a0a
9
Exceptions-and-errors.md
Normal file
9
Exceptions-and-errors.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Draft]
|
||||||
|
|
||||||
|
1) We start actively discriminating between recoverable and non-recoverable errors when we discuss things.
|
||||||
|
|
||||||
|
2) We mainly use asserts (particularly `doAssert`) when we are trying to detect non-recoverable errors in the code. Most APIs should be rather strict about their inputs.
|
||||||
|
|
||||||
|
3) We bless the use of both exceptions and error codes for recoverable errors (the more appropriate is selected on a case-by-case basis). We make an active effort to document the recoverable errors of each API when we design it.
|
||||||
|
|
||||||
|
4) We gradually introduce the helpers from my proposal to turn the documented APIs into compiler-checked specifications.
|
Loading…
x
Reference in New Issue
Block a user