Script.Assert

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");

Copyright © 2010 - 2023 Emakin. All rights reserved.