forked from rebolsource/r3
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Error handling overhaul, includes CC#1743
This is a major rewrite of the setjmp/longjmp-based error handling, and it's not really that reasonable or feasible to break it up much more than this. These things are all inter-related. From a userspace point of view, in a scripted context (such as --do or running a script by filename on the command line) the interpreter will exit on error by default. Previously it would break into the CLI. More sophisticated handling is suggested in CC#2215. Another difference is that QUIT no longer has a /NOW refinement, and only accepts integer arguments. (When definitionally-scoped return is implemented, then EXIT may be repurposed to be the "catchable" form, while QUIT is always assumed to mean "now" and end the process) From a developer point of view, the central ideas are that there aren't two separate saved states to worry about (Halt_State is integrated into Saved_State) and the PUSH_CATCH/DROP_CATCH macros are clearer and simpler, with less chance for making mistakes in usage. The mechanism for including a REBVAL associated with an error has been simplified and formalized a little more. Though simpler, an attempt to further tighten the grip on this "sneaky" way of having one error-per-task turned out to complicate the code a bit too much, and so it could still be improved with some better asserts.
- Loading branch information
1 parent
43e40d8
commit 9b21568
Showing
16 changed files
with
974 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.