mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-21 01:15:42 +02:00
mod/ipcalc: use :onerror for outer block
This commit is contained in:
parent
9b558ff8a1
commit
8cddc63767
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
|||
:global IPCalcReturn;
|
||||
|
||||
# print netmask, network, min host, max host and broadcast
|
||||
:set IPCalc do={ :do {
|
||||
:set IPCalc do={ :onerror Err {
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global FormatLine;
|
||||
|
@ -27,8 +27,8 @@
|
|||
[ $FormatLine "HostMin" ($Values->"hostmin") ] . "\n" . \
|
||||
[ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
|
||||
[ $FormatLine "Broadcast" ($Values->"broadcast") ]) ];
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# calculate and return netmask, network, min host, max host and broadcast
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue