refactor(sterni/blipqn): only attempt •CurrentError when it'll work

I've finally figured out what the problem was with •CurrentError:
Passing a namespace as 𝕩 to •CurrentError is not supported as it may
control some kind of special behavior in the future. The right thing to
do seems to check the •Type of 𝕩 and only attempt to use •CurrentError
if it isn't a namespace.

Change-Id: I012009d0f1b913e77d65776ee43062817199baab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13106
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2025-02-06 12:23:09 +01:00 committed by clbot
parent 78af9a2306
commit 04261c274f

View file

@ -34,8 +34,8 @@ MakeFlipdot ← {
# assertion failure with the error message after executing 𝔾. This looses
# the original error location, though.
_defer_ {
# At least in CBQN, •CurrentError may fail for namespace related reasons
sr (1𝔾)(0(•CurrentError("_defer_: Unknown Error occurred"˙))) 𝕩 𝔽 𝕩 rr!s;
# can't use •CurrentError if 𝕩 is namespace: https://github.com/dzaima/cbqn/commit/d6609df82
sr (1𝔾)(0((6=•Type)•CurrentError,"_defer_: Unknown Error occurred"˙)) 𝕩 𝔽 𝕩 rr!s;
(𝕨𝔽) _𝕣_ (𝕨𝔾) 𝕩
}