Assert¶
Fails the current server workflow script when condition is false.
myScript.Assert(condition: any, message?: string):void
Parameters¶
any condition
A value evaluated with JavaScript truthiness.
string message optional
Error text returned in the thrown JavaScript Error.
Remarks¶
Server workflow scripts only. Use this for guard clauses and invariant checks; it does not display a user message.
Example¶
1 | |