mod/ipcalc: $IPCalc: use $ExitError to indicate unintentional error

This commit is contained in:
Christian Hesse 2024-12-09 09:10:27 +01:00
parent 05cb87f475
commit 34172e4c78

View file

@ -12,7 +12,7 @@
:global IPCalcReturn;
# print netmask, network, min host, max host and broadcast
:set IPCalc do={
:set IPCalc do={ :do {
:local Input [ :tostr $1 ];
:global FormatLine;
@ -27,7 +27,9 @@
[ $FormatLine "HostMin" ($Values->"hostmin") ] . "\n" . \
[ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
[ $FormatLine "Broadcast" ($Values->"broadcast") ]) ];
}
} on-error={
:global ExitError; $ExitError false $0;
} }
# calculate and return netmask, network, min host, max host and broadcast
:set IPCalcReturn do={