First, a little observation: something like this
Code: Select all
$x = formatdate(gttw3tw);TheQwerty suggests using assert, which takes an optional "continue" flag. Setting it it's like no "real" error is thrown at all, because the UDF continues. Not setting the "continue" flag terminates the whole script instead.
Then there's end, which is more granular because it allows to abort the UDF without terminating the whole script, however it throws a warning with a popup window, which is not consistent with a "genuine" function error.
So, how can I throw an error in a UDF which
-makes the script console pop up
-aborts the rest of the UDF
-continues executing the rest of the calling script,
much like an XY function?
XYplorer Beta Club