let say we execute a command "/ip firewall address-list add list=abc address=1.0.0.1" from a script.
if this execution failed, the script will :put "Failed" else :put "Success".
Is it possible to catch ?
:global RetCode; :execute (":global RetCode;" . \ "/ip firewall address-list add ;" . \ ":set RetCode 1;") :local wait 5; :set RetCode 0; :while ($RetCode = 0 && $wait > 0) do={ :set wait ($wait - 1); :delay 1; } :if ($RetCode = 1) do={ :put "Command executed successfully" } else={ :if ($wait = 0) do={ :put "Command timed out" } else={ :put "Command failed" } }
Is there any timeframe on the implementation of this? Back you 2009you mentionedthis feature would be added in later releases.Currently there is no built in catch.
Is there any timeframe on the implementation of this? Back you 2009you mentionedthis feature would be added in later releases.Currently there is no built in catch.