JUCE
|
On MacOS, iOS and Linux getResult will return a nullptr if the evaluation failed. More...
Classes | |
struct | Error |
A simple error type class. More... | |
Public Member Functions | |
EvaluationResult (const var &result) | |
EvaluationResult (const Error &error) | |
const var * | getResult () const |
const Error * | getError () const |
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.