diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-09 09:10:27 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | 34172e4c78cc5a6d0fe99df279e42a8794f84c94 (patch) | |
tree | 3a3f8859830f441691ab1210662a22b35f6a3324 | |
parent | 05cb87f475ffc3f9fdc1fa6988925e79a3dacd38 (diff) |
mod/ipcalc: $IPCalc: use $ExitError to indicate unintentional error
-rw-r--r-- | mod/ipcalc.rsc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/ipcalc.rsc b/mod/ipcalc.rsc index 003bdc3..021cd30 100644 --- a/mod/ipcalc.rsc +++ b/mod/ipcalc.rsc @@ -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={ |