How can I elegantly trigger an error in the script when a condition is not met?
I do not want to exit the script without an error because then I would not get a warning in the Publisher...
My preferred technique: use the CRASH; statement. It doesn't exist but it will do what it says...
Maybe something like this:
if condition = false() then
Load * Resident NotExistingTable;
Will work but not the most elegant one
IF Condition Not met,
trace 'This condition has not been met!';
Thanks for the feedback. But this will not trigger an error in my mgmt console.
You can use any word that is not a command
If 1 <> 0 then
Will it find the endif statement?
IF condition then
TRACE( Condition is not valid);
SET TriggerError; //This line of code triggers an error
Retrieving data ...