diff --git a/docs/system.md b/docs/system.md index 088e8b5c..3eed7e03 100644 --- a/docs/system.md +++ b/docs/system.md @@ -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` diff --git a/src/builtins/sysfn.c b/src/builtins/sysfn.c index 4e1f25c4..c35493fa 100644 --- a/src/builtins/sysfn.c +++ b/src/builtins/sysfn.c @@ -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);