In this example, calling p initially shows the expected code location in the echo error, but after calling echo erroneously at the top-level, the code location from the last failed top-level execution is displayed thereafter when calling p.
ysh-0.24.0$ proc p (...args) {
> echo $args # introducing a bug so this fails
> }
ysh-0.24.0$ p 1 2 3
echo $args # introducing a bug so this fails
^~~~
[ interactive ]:2: fatal: Word eval got a List, which can't be stringified (OILS-ERR-203)
ysh-0.24.0$ echo $[{}]
echo $[{}]
^~
[ interactive ]:5: fatal: Expr sub expected one of (Null Bool Int Float Str Eggex), got Dict
ysh-0.24.0$ p 1 2 3
echo $[{}]
^~
[ interactive ]:5: fatal: Word eval got a List, which can't be stringified (OILS-ERR-203)
In this example, calling
p
initially shows the expected code location in theecho
error, but after callingecho
erroneously at the top-level, the code location from the last failed top-level execution is displayed thereafter when callingp
.