Originally proposed in #167
Once JSONata has an $error() function, the most common use case becomes building assert statements.
Syntax:
$assert(condition, message)
If condition is true, the function returns undefined. If the condition is false, an exception is thrown with the message as the message of the exception.