exists
Indicates whether there is currently an operation context, i.e. if the currently executing code has been called from an operation.
When false
, accessing other properties and calling functions in this namespace will result in an exception being thrown. When true
, other properties and functions in this namespace can be used safely.
Examples:
function main() {
print(op_context.exists); // prints false
}
Content copied to clipboard
operation main() {
print(op_context.exists); // prints true
}
Content copied to clipboard
Since
0.11.0