|
RMQ - RabbitMQ C++ Library
|
A result of an operation. More...
#include <rmqt_result.h>
Public Member Functions | |
| Result (const bsl::string &error, int resultCode=-1) | |
| Constructs an error result. More... | |
| Result (const bsl::shared_ptr< T > &value, const bsl::string &error=bsl::string(), int resultCode=0) | |
| const bsl::shared_ptr< T > & | value () const |
| const bsl::string & | error () const |
| int | returnCode () const |
| operator BoolType () const | |
| bsl::ostream & | operator<< (bsl::ostream &os) |
A result of an operation.
This class provides access to an operation. The result object either contains the value of the result (if the operation was successful) or an error code and message explaining why the operation failed.
|
inlineexplicit |
Constructs an error result.
| error | Error message |
| resultCode | Result code indicating the type of failure |
|
inlineexplicit |
|
inline |
Error message
|
inline |
Used to safely convert a Result object to bool.
|
inline |
Return code
|
inline |
Result value