-
Notifications
You must be signed in to change notification settings - Fork 143
Exceptions and errors
Mamy Ratsimbazafy edited this page Jul 2, 2018
·
3 revisions
[Draft]
-
We start actively discriminating between recoverable and non-recoverable errors when we discuss things.
-
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. -
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.
-
We gradually introduce the helpers from my proposal to turn the documented APIs into compiler-checked specifications.