ensure

@Contract(value = "false, _ -> fail")
fun ensure(condition: Boolean, message: String?)

Check that the condition is true, otherwise throw a GraphPreconditionFailure with the given message.

Parameters

condition

The condition that should be true.

message

A description of the failed precondition.

Throws