:if ([ :typeof $1 ] = "time") do={:if (($1 > 0s) = true) do={:return $1} else={:return $2};}\r
:if ([ :len [ :tostr $1 ] ] > 0) do={:return $1} else={:return $2};\r
}\r
+:local ExitError do={\r
+ :local ExitOK [ :tostr $1 ];\r
+ :local Name [ :tostr $2 ];\r
+ :local Error [ :tostr $3 ];\r
+ :if ($ExitOK = "false") do={:log error ($Name [ $IfThenElse ([ :pick $Name 0 1 ] = "\$") \\r
+ "Function" "Script" ] . " '" . $Name . "' exited with error" . \\r
+ [ $IfThenElse (!($Error ~ "^(|true|false)\$")) (": " . $Error) "." ]);}\r
+}\r
\r
:global LogPrint;\r
:global EditSchedulers;\r