mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 10:14:56 +02:00
mod/notification-matrix: use :onerror for outer block
This commit is contained in:
parent
9d845d40f0
commit
d865deb8a8
1 changed files with 6 additions and 6 deletions
|
@ -19,7 +19,7 @@
|
|||
:global SetupMatrixJoinRoom;
|
||||
|
||||
# flush Matrix queue
|
||||
:set FlushMatrixQueue do={ :do {
|
||||
:set FlushMatrixQueue do={ :onerror Err {
|
||||
:global MatrixQueue;
|
||||
|
||||
:global IsFullyConnected;
|
||||
|
@ -58,8 +58,8 @@
|
|||
/system/scheduler/remove [ find where name="_FlushMatrixQueue" ];
|
||||
:set MatrixQueue;
|
||||
}
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# send notification via Matrix - expects one array argument
|
||||
|
@ -167,12 +167,12 @@
|
|||
}
|
||||
|
||||
# send notification via Matrix - expects at least two string arguments
|
||||
:set SendMatrix do={ :do {
|
||||
:set SendMatrix do={ :onerror Err {
|
||||
:global SendMatrix2;
|
||||
|
||||
$SendMatrix2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# send notification via Matrix - expects one array argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue