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:
parent
78af9a2306
commit
04261c274f
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
s‿r ← (1⊸⋈∘𝔾)⎊(0⊸⋈∘(•CurrentError⎊("_defer_: Unknown Error occurred"˙))) 𝕩 ⋄ 𝔽 𝕩 ⋄ r⊣r!s;
|
||||
# can't use •CurrentError if 𝕩 is namespace: https://github.com/dzaima/cbqn/commit/d6609df82
|
||||
s‿r ← (1⊸⋈∘𝔾)⎊(0⊸⋈∘((6⊸=•Type)◶⟨•CurrentError,"_defer_: Unknown Error occurred"˙⟩)) 𝕩 ⋄ 𝔽 𝕩 ⋄ r⊣r!s;
|
||||
(𝕨⊸𝔽) _𝕣_ (𝕨⊸𝔾) 𝕩
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue