| JUCE
    | 
Represents the 'success' or 'failure' of an operation, and holds an associated error message to describe the error when there's a failure. More...
#include <juce_Result.h>
| Public Member Functions | |
| bool | wasOk () const noexcept | 
| Returns true if this result indicates a success. | |
| bool | failed () const noexcept | 
| Returns true if this result indicates a failure. | |
| operator bool () const noexcept | |
| Returns true if this result indicates a success. | |
| bool | operator! () const noexcept | 
| Returns true if this result indicates a failure. | |
| const String & | getErrorMessage () const noexcept | 
| Returns the error message that was set when this result was created. | |
| Result (const Result &) | |
| Result & | operator= (const Result &) | 
| Result (Result &&) noexcept | |
| Result & | operator= (Result &&) noexcept | 
| bool | operator== (const Result &other) const noexcept | 
| bool | operator!= (const Result &other) const noexcept | 
| Static Public Member Functions | |
| static Result | ok () noexcept | 
| Creates and returns a 'successful' result. | |
| static Result | fail (const String &errorMessage) noexcept | 
| Creates a 'failure' result. | |
Represents the 'success' or 'failure' of an operation, and holds an associated error message to describe the error when there's a failure.
E.g.
| Result::Result | ( | const Result & | ) | 
| 
 | noexcept | 
| 
 | staticnoexcept | 
Creates and returns a 'successful' result.
Creates a 'failure' result.
If you pass a blank error message in here, a default "Unknown Error" message will be used instead.
| 
 | noexcept | 
Returns true if this result indicates a success.
| 
 | noexcept | 
Returns true if this result indicates a failure.
You can use getErrorMessage() to retrieve the error message associated with the failure.
| 
 | noexcept | 
Returns true if this result indicates a success.
This is equivalent to calling wasOk().
| 
 | noexcept | 
Returns true if this result indicates a failure.
This is equivalent to calling failed().
| 
 | noexcept | 
Returns the error message that was set when this result was created.
For a successful result, this will be an empty string;
| 
 | noexcept | 
| 
 | noexcept |