mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-21 01:15:42 +02:00
global-functions: :do ... on-error=... -> :onerror ... do=...
This commit is contained in:
parent
8b1b73c936
commit
5c599beae1
1 changed files with 3 additions and 3 deletions
|
@ -1771,10 +1771,10 @@
|
|||
:foreach Script in=[ /system/script/find where name ~ "^mod/." ] do={
|
||||
:local ScriptVal [ /system/script/get $Script ];
|
||||
:if ([ $ValidateSyntax ($ScriptVal->"source") ] = true) do={
|
||||
:do {
|
||||
:onerror Err {
|
||||
/system/script/run $Script;
|
||||
} on-error={
|
||||
$LogPrint error $0 ("Module '" . $ScriptVal->"name" . "' failed to run.");
|
||||
} do={
|
||||
$LogPrint error $0 ("Module '" . $ScriptVal->"name" . "' failed to run: " . $Err);
|
||||
}
|
||||
} else={
|
||||
$LogPrint error $0 ("Module '" . $ScriptVal->"name" . "' failed syntax validation, skipping.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue