reserve •CurrentError with namespace 𝕩
This commit is contained in:
parent
1e22b48225
commit
d6609df820
@ -83,7 +83,7 @@ May be removed or renamed in the future.
|
||||
|
||||
Get the current error message while within the catch side of `⎊`. Dynamically-scoped.
|
||||
|
||||
Might return a more informative object in the future (e.g. whether the error came from an `!`, the compiler or a builtin, maybe stacktrace reading, etc; such a format is TBD).
|
||||
Argument must not be a namespace, as that is reserved for future changes.
|
||||
|
||||
## `•internal`
|
||||
|
||||
|
||||
@ -704,6 +704,7 @@ B repl_c1(B t, B x) {
|
||||
#if CATCH_ERRORS
|
||||
B lastErrMsg;
|
||||
B currentError_c1(B t, B x) {
|
||||
if (isNsp(x)) thrM("•CurrentError: Namespace 𝕩 is reserved");
|
||||
dec(x);
|
||||
if (q_N(lastErrMsg)) thrM("•CurrentError: Not currently within any ⎊");
|
||||
return inc(lastErrMsg);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user