mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-27 11:29:34 +00:00
global-functions: deprecate $ExitError
This commit is contained in:
parent
cd62eed55f
commit
079ca0a987
2 changed files with 14 additions and 14 deletions
|
|
@ -8,8 +8,22 @@
|
|||
# deprecated global functions
|
||||
# https://rsc.eworm.de/
|
||||
|
||||
:global ExitError;
|
||||
:global HexToNum;
|
||||
|
||||
# wrapper for $ExitOnError with additional parameter
|
||||
:set ExitError do={
|
||||
:local ExitOK [ :tostr $1 ];
|
||||
:local Name [ :tostr $2 ];
|
||||
:local Error [ :tostr $3 ];
|
||||
|
||||
:global ExitOnError;
|
||||
|
||||
:if ($ExitOK = "false") do={
|
||||
$ExitOnError $Name $Error;
|
||||
}
|
||||
}
|
||||
|
||||
# convert from hex (string) to num
|
||||
:set HexToNum do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
:global DownloadPackage;
|
||||
:global EitherOr;
|
||||
:global EscapeForRegEx;
|
||||
:global ExitError;
|
||||
:global ExitOnError;
|
||||
:global FetchHuge;
|
||||
:global FetchUserAgentStr;
|
||||
|
|
@ -483,19 +482,6 @@
|
|||
:return $Return;
|
||||
}
|
||||
|
||||
# wrapper for $ExitOnError with additional parameter
|
||||
:set ExitError do={
|
||||
:local ExitOK [ :tostr $1 ];
|
||||
:local Name [ :tostr $2 ];
|
||||
:local Error [ :tostr $3 ];
|
||||
|
||||
:global ExitOnError;
|
||||
|
||||
:if ($ExitOK = "false") do={
|
||||
$ExitOnError $Name $Error;
|
||||
}
|
||||
}
|
||||
|
||||
# simple macro to print error message on unintentional error
|
||||
:set ExitOnError do={
|
||||
:local Name [ :tostr $1 ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue