Closed apt1002 closed 4 years ago
I have now addressed this in the commit mentioned above; please could you review, @apt1002? I have not made 0 something other than an error code, because I think that introduces more complexity than it solves. It's fairly common for an exit status to be what we might think of in a richer type system as a "Maybe(Error)", for example process exit codes. My counter-suggestion is therefore to rename "error code" to something more neutral, say, "status code".
We have replaced "error code" with "status code", and proposed further improvements to the definition of stack pictures in issue #404.
Maybe describe it as a three-level structure. First describe a stack of words (replace
-
with->
), then a stack of frames, then a stack of catch blocks. Define the||
notation, and introduce a similar notation for catch blocks.Need to define "the caller" in section
errors
.Separate the concept of normal return, which returns values, from exceptional return, which does not. Say that error codes are non-zero; don't say that zero is an error code. Specify the behaviour of
0 throw
.