mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-14 15:09:02 +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;
|
:global SetupMatrixJoinRoom;
|
||||||
|
|
||||||
# flush Matrix queue
|
# flush Matrix queue
|
||||||
:set FlushMatrixQueue do={ :do {
|
:set FlushMatrixQueue do={ :onerror Err {
|
||||||
:global MatrixQueue;
|
:global MatrixQueue;
|
||||||
|
|
||||||
:global IsFullyConnected;
|
:global IsFullyConnected;
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
/system/scheduler/remove [ find where name="_FlushMatrixQueue" ];
|
/system/scheduler/remove [ find where name="_FlushMatrixQueue" ];
|
||||||
:set MatrixQueue;
|
:set MatrixQueue;
|
||||||
}
|
}
|
||||||
} on-error={
|
} do={
|
||||||
:global ExitError; $ExitError false $0;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via Matrix - expects one array argument
|
# send notification via Matrix - expects one array argument
|
||||||
|
@ -167,12 +167,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# send notification via Matrix - expects at least two string arguments
|
# send notification via Matrix - expects at least two string arguments
|
||||||
:set SendMatrix do={ :do {
|
:set SendMatrix do={ :onerror Err {
|
||||||
:global SendMatrix2;
|
:global SendMatrix2;
|
||||||
|
|
||||||
$SendMatrix2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
$SendMatrix2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
||||||
} on-error={
|
} do={
|
||||||
:global ExitError; $ExitError false $0;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via Matrix - expects one array argument
|
# send notification via Matrix - expects one array argument
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue