mod/inspectvar: use :onerror for outer block

This commit is contained in:
Christian Hesse 2025-05-06 09:45:14 +02:00
parent d5141f43e5
commit 9b558ff8a1

View file

@ -12,12 +12,12 @@
:global InspectVarReturn;
# inspect variable and print on terminal
:set InspectVar do={ :do {
:set InspectVar do={ :onerror Err {
:global InspectVarReturn;
:put [ :tocrlf [ $InspectVarReturn $1 ] ];
} on-error={
:global ExitError; $ExitError false $0;
} do={
:global ExitError; $ExitError false $0 $Err;
} }
# inspect variable and return formatted string