mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-31 15:52:37 +00:00
global-functions: deprecate $ExitError
This commit is contained in:
parent
e1e5b1b533
commit
78f80309cd
2 changed files with 14 additions and 14 deletions
|
|
@ -8,9 +8,23 @@
|
|||
# deprecated global functions
|
||||
# https://rsc.eworm.de/
|
||||
|
||||
:global ExitError;
|
||||
:global HexToNum;
|
||||
:global UrlEncode;
|
||||
|
||||
# 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;
|
||||
|
|
@ -488,19 +487,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