|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
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.
@tags{Core}
Definition at line 56 of file juce_Result.h.
Definition at line 33 of file juce_Result.cpp.
|
noexcept |
Definition at line 44 of file juce_Result.cpp.
Creates a 'failure' result.
If you pass a blank error message in here, a default "Unknown Error" message will be used instead.
Definition at line 65 of file juce_Result.cpp.
|
noexcept |
Returns true if this result indicates a failure.
You can use getErrorMessage() to retrieve the error message associated with the failure.
Definition at line 77 of file juce_Result.cpp.
Returns the error message that was set when this result was created.
For a successful result, this will be an empty string;
Definition at line 70 of file juce_Result.cpp.
Creates and returns a 'successful' result.
Definition at line 61 of file juce_Result.h.
|
noexcept |
Returns true if this result indicates a success.
This is equivalent to calling wasOk().
Definition at line 76 of file juce_Result.cpp.
|
noexcept |
Returns true if this result indicates a failure.
This is equivalent to calling failed().
Definition at line 78 of file juce_Result.cpp.
|
noexcept |
Definition at line 60 of file juce_Result.cpp.
Definition at line 38 of file juce_Result.cpp.
Definition at line 49 of file juce_Result.cpp.
Definition at line 55 of file juce_Result.cpp.
|
noexcept |
Returns true if this result indicates a success.
Definition at line 75 of file juce_Result.cpp.