mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-27 22:34:58 +02:00
mod/inspectvar: use :onerror for outer block
This commit is contained in:
parent
d5141f43e5
commit
9b558ff8a1
1 changed files with 3 additions and 3 deletions
|
@ -12,12 +12,12 @@
|
||||||
:global InspectVarReturn;
|
:global InspectVarReturn;
|
||||||
|
|
||||||
# inspect variable and print on terminal
|
# inspect variable and print on terminal
|
||||||
:set InspectVar do={ :do {
|
:set InspectVar do={ :onerror Err {
|
||||||
:global InspectVarReturn;
|
:global InspectVarReturn;
|
||||||
|
|
||||||
:put [ :tocrlf [ $InspectVarReturn $1 ] ];
|
:put [ :tocrlf [ $InspectVarReturn $1 ] ];
|
||||||
} on-error={
|
} do={
|
||||||
:global ExitError; $ExitError false $0;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# inspect variable and return formatted string
|
# inspect variable and return formatted string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue