mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-24 21:04:28 +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;
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue