mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-19 09:08:56 +02:00
global-functions: $ValidateSyntax: add debug output
This commit is contained in:
parent
f5c4378676
commit
8b1b73c936
1 changed files with 3 additions and 0 deletions
|
@ -1652,9 +1652,12 @@
|
||||||
:set ValidateSyntax do={
|
:set ValidateSyntax do={
|
||||||
:local Code [ :tostr $1 ];
|
:local Code [ :tostr $1 ];
|
||||||
|
|
||||||
|
:global LogPrint;
|
||||||
|
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
[ :parse (":local Validate do={\n" . $Code . "\n}") ];
|
[ :parse (":local Validate do={\n" . $Code . "\n}") ];
|
||||||
} do={
|
} do={
|
||||||
|
$LogPrint debug $0 ("Valdation failed: " . $Err);
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
:return true;
|
:return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue