From 04261c274fc5d98d428856d6129cb0bbd86cd2dd Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 6 Feb 2025 12:23:09 +0100 Subject: [PATCH] =?UTF-8?q?refactor(sterni/blipqn):=20only=20attempt=20?= =?UTF-8?q?=E2=80=A2CurrentError=20when=20it'll=20work?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: BuildkiteCI Reviewed-by: sterni --- users/sterni/blipqn/blipqn.bqn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/sterni/blipqn/blipqn.bqn b/users/sterni/blipqn/blipqn.bqn index a18f68b2e..95b36c0d0 100644 --- a/users/sterni/blipqn/blipqn.bqn +++ b/users/sterni/blipqn/blipqn.bqn @@ -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; (𝕨⊸𝔽) _𝕣_ (𝕨⊸𝔾) 𝕩 }