Skip to content

Instantly share code, notes, and snippets.

@earl

earl/toplevel-errors.patch Secret

Created Jul 26, 2015
Embed
What would you like to do?
diff --git a/src/core/s-mold.c b/src/core/s-mold.c
index 50c6b2a..a85e938 100644
--- a/src/core/s-mold.c
+++ b/src/core/s-mold.c
@@ -919,16 +919,11 @@ static void Mold_Error(const REBVAL *value, REB_MOLD *mold, REBFLG molded)
}
if (VAL_ERR_NUM(value) < RE_THROW_MAX) {
- // !!! TBD: write a good dumper for unprocessed BREAK, THROW,
- // CONTINUE, RETURN. These have no frames, and with increased
- // rigor making a "fake" frame with a THROWN error number has
- // been prohibited to prevent accidents.
-
- Emit(mold, "** I", VAL_ERR_NUM(value));
- return;
+ err = ERR_VALUES(Make_Error(VAL_ERR_NUM(value), value, 0, 0)); // spoofs field
+ }
+ else {
+ err = VAL_ERR_VALUES(value);
}
-
- err = VAL_ERR_VALUES(value);
// Form: ** <type> Error:
Emit(mold, "** WB", &err->type, RS_ERRS+0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.