telegram-chat: use :onerror for outer block

This commit is contained in:
Christian Hesse 2025-05-06 09:44:23 +02:00
parent aae9b4d4e3
commit 3ad8cafc7a

View file

@ -13,7 +13,7 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Identity; :global Identity;
@ -190,6 +190,6 @@
} }
:set TelegramChatOffset ([ :pick $TelegramChatOffset 1 3 ], \ :set TelegramChatOffset ([ :pick $TelegramChatOffset 1 3 ], \
[ $IfThenElse ($UpdateID >= $TelegramChatOffset->2) ($UpdateID + 1) ($TelegramChatOffset->2) ]); [ $IfThenElse ($UpdateID >= $TelegramChatOffset->2) ($UpdateID + 1) ($TelegramChatOffset->2) ]);
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }