Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

Script.Assert(DateTimeOffset.now.getDate() === 1, "Not a good day");

Example

Script.Assert(isCompleted, "Operation is not completed");
  • No labels