使用循环变量时 Raku 是否会丢弃异常?

jjm*_*elo 7 exception raku

我真的找不到对此的其他解释:

for <a b> -> $foo {
    spurt "a/b", "bar";
}
say "Gotcha";
for <a b>  {
    spurt "a/b", "bar";
}
Run Code Online (Sandbox Code Playgroud)

这会打印“Gotcha”然后失败。我得到循环中的最后一个值被返回,如果没有做任何事情,它在接收器上下文中,但是什么样的变化会带来声明一个变量呢?据Block我所知,它仍然是一个。

jub*_*us1 1

使用乐都 2022.07

返回:

Gotcha
Failed to open file /Users/admin/a/b: No such file or directory
  in block <unit> at - line 6
Run Code Online (Sandbox Code Playgroud)