On MacOS, iOS and Linux getResult will return a nullptr if the evaluation failed.
More...
On MacOS, iOS and Linux getResult will return a nullptr if the evaluation failed.
In this case getError will return a non-null Error result, which contains more information about why the evaluation failed. It could be e.g. a syntax error or referencing an undefined object.
On Windows and Android getResult will always return a valid pointer to a variant, and getError will always return a nullptr. In case there was an evaluation failure, getResult returns a void variant, which is indistinguishable from a successful evaluation that yielded a null result. Unfortunately these platforms don't offer a way to detect evaluation errors.