|
Couchbase Lite C++
Couchbase Lite C++ API
|
The exception thrown by the Couchbase Lite C++ API to report a Couchbase Lite failure. More...
#include <cbl++/Base.hh>
Public Member Functions | |
| Error (CBLErrorDomain domain, int code, const std::string &what) | |
| Constructs an Error. | |
| Error () | |
| Error & | operator= (const Error &other) |
Public Attributes | |
| CBLErrorDomain | domain |
| Domain of errors. | |
| int | code |
| Error code, specific to the domain. 0 always means no error. | |
The exception thrown by the Couchbase Lite C++ API to report a Couchbase Lite failure.
It derives from std::runtime_error (and thus std::exception) and carries the failure's domain and code (the same values as the C API's CBLError), plus a human-readable message available via what(). Catch this type when you need the structured error information; catch std::exception for general handling.
|
inline |
Constructs an Error.
| domain | The error domain. |
| code | The error code, specific to the domain. |
| what | The human-readable error message (returned by what()). |
|
inline |
| int cbl::Error::code |
Error code, specific to the domain. 0 always means no error.
| CBLErrorDomain cbl::Error::domain |
Domain of errors.