![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_Exception.h>
Error checker convenience class for AAX_Result
Implicitly convertable to an AAX_Result.
Provides an overloaded operator=()
which will throw an AAX::Exception::ResultError if assigned a non-success result.
If the host supports AAX_TRACE tracing, a log is emitted when the exception is thrown. A stacktrace is added if the host's trace priority filter level is set to kAAX_Trace_Priority_Lowest
When an error is encountered, AAX_CheckedResult throws an AAX_CheckedResult::Exception exception and clears its internal result value.
GetEffectDescriptions()
on the plug-in includes an appropriate exception handler, so AAX_CheckedResult objects may be used within a plug-in's describe code without additional catch scopes.It is assumed that the exception handler will resolve any error state and that the AAX_CheckedResult may therefore continue to be used from a clean state following the exception catch block.
If the previous error value is required then it can be retrieved using AAX_CheckedResult::LastError().
It is possible to add one or more accepted non-success values to an AAX_CheckedResult so that these values will not trigger exceptions:
Public Types | |
typedef AAX::Exception::ResultError | Exception |
Public Member Functions | |
~AAX_CheckedResult () | |
AAX_CheckedResult () | |
Construct an AAX_CheckedResult in a success state. More... | |
AAX_CheckedResult (AAX_Result inResult) | |
Implicit conversion constructor from AAX_Result. More... | |
void | AddAcceptedResult (AAX_Result inResult) |
Add an expected result which will not result in a throw. More... | |
void | ResetAcceptedResults () |
AAX_CheckedResult & | operator= (AAX_Result inResult) |
Assignment to AAX_Result. More... | |
AAX_CheckedResult & | operator|= (AAX_Result inResult) |
bitwise-or assignment to AAX_Result More... | |
operator AAX_Result () const | |
Conversion to AAX_Result. More... | |
void | Clear () |
Clears the current result state. More... | |
AAX_Result | LastError () const |
Get the last non-success result which was stored in this object, or AAX_SUCCESS if no non-success result was ever stored in this object. More... | |
|
inline |
|
inline |
Construct an AAX_CheckedResult in a success state.
|
inline |
Implicit conversion constructor from AAX_Result.
Implicit conversion is OK in order to support AAX_CheckedResult cr = SomeFunc()
|
inline |
Add an expected result which will not result in a throw.
It is acceptable for some methods to return certain non-success values such as AAX_RESULT_PACKET_STREAM_NOT_EMPTY or AAX_RESULT_NEW_PACKET_POSTED
|
inline |
References AAX_SUCCESS.
|
inline |
|
inline |
bitwise-or assignment to AAX_Result
Sometimes used in legacy code to aggregate results into a single AAX_Result value
References operator=().
|
inline |
Conversion to AAX_Result.
|
inline |
Clears the current result state.
Does not affect the set of accepted results
References AAX_SUCCESS.
|
inline |
Get the last non-success result which was stored in this object, or AAX_SUCCESS if no non-success result was ever stored in this object.