|
AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.5.4
|
Base class for all exceptions in AMPS. More...
#include <AMPSException.hpp>
Inheritance diagram for AMPS::AMPSException:Public Member Functions | |
| AMPSException (const std::string &message_, amps_result result_) | |
| Construct an AMPSException from a text message. More... | |
| AMPSException (amps_handle client_, amps_result result_) | |
| Construct an AMPSException from the last error message on client. More... | |
| const char * | toString () const |
| Returns a null-terminated string containing self's error message. | |
| virtual const char * | getClassName () const |
| Returns the actual name of the subclass thrown – useful when RTTI is disabled, but you'd still like to log the exact exception type. | |
Static Public Member Functions | |
| template<class T > | |
| static void | throwFor (const T &context_, amps_result result_) |
| Constructs and throws the appropriate exception corresponding to a given result. More... | |
Base class for all exceptions in AMPS.
May be constructed with text, or with a client handle, in which case the exception text is made equal to the last error message on that client.
|
inline |
Construct an AMPSException from a text message.
| message_ | The text of the error message. |
| result_ | The last amps_result you were given. |
|
inline |
Construct an AMPSException from the last error message on client.
| client_ | The client to retrieve an error message from. |
| result_ | The result code you last retrieved from this client. |
|
static |
Constructs and throws the appropriate exception corresponding to a given result.
| context_ | The object to pass to the exception's constructor. |
| result_ | the result that should be used to determine the exception type. |