global-functions: deprecate $ExitError

This commit is contained in:
Christian Hesse 2026-01-20 10:55:45 +01:00
parent 2dce1acd9b
commit 792d584923
2 changed files with 14 additions and 14 deletions

View file

@ -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 ];