Overview
Asserts that the condition is true. If not, an error is thrown.void myScript.Assert(condition: boolean, message: string)
Arguments
boolean condition
The condition to assert.
string message
The message to display if the condition is false.
Example
Code Block | ||
---|---|---|
| ||
Script.Assert(DateTimeOffset.now.getDate() === 1, "Not a good day"); |
Example
Code Block | ||
---|---|---|
| ||
Script.Assert(isCompleted, "Operation is not completed"); |