Raises a runtime error with message err when executed. This function is only intended to be called inside a user-defined function body.
err: the error message to emit.
Examples
def pure nonNegativeSqrt(x: number) with
if x < 0
_ = assertfail("Expected non-negative x, got \{x}.")
return sqrt(x)
show scalar "" with nonNegativeSqrt(9)
Output:
Result
3
Errors
Calling assertfail always raises a runtime error with the provided message.
Remarks
The return value of assertfail is not significant; assign it to the discard variable _.