MOO-cows Mailing List Archive


Re: ALPHA-TEST/Error-handling

> -- Added new error-catching expression:
> 		`EXPR ! CODES => EXPR_H'
> Next, EXPR is evaluated.  If it evaluated normally, without raising an
> error, then its value becomes the value of the entire error-catching
> expression.   If evaluating EXPR results in an error being raised, then call
> it E.  If E is in the list resulting from CODES, then E is considered
> "caught" by this error-catching expression.
[... one example:]
> 	`1 / 0 ! ANY'
> 		Returns E_DIV.

It's perhaps worth being really explicit about this point in the ChangeLog,
clearly stating that there's a difference between ``typeof(EXPR)==ERR''
and ``EXPR raises an error''; that is, `E_DIV ! E_DIV => 0' returns E_DIV
because even though EXPR == E_DIV, this does not involve *raising* an error
like 1/0 does.  (so `1/0 ! E_DIV => 0' will return 0)

michael, just trying to head off potential confusion before it makes its
way to the mailing list en masse...

Home | Subject Index | Thread Index