QEverCloud
3.0.0
Unofficial Evernote Cloud API for Qt
|
EverCloudException counterpart for asynchronous API. More...
#include <EverCloudException.h>
Public Member Functions | |
EverCloudExceptionData (QString error) | |
virtual void | throwException () const |
Public Attributes | |
QString | errorMessage |
EverCloudException counterpart for asynchronous API.
Asynchronous functions cannot throw exceptions so descendants of EverCloudExceptionData are retunded instead in case of an error. Every exception class has its own counterpart. The EverCloudExceptionData descendants hierarchy is a copy of the EverCloudException descendants hierarchy.
The main reason not to use exception classes directly is that dynamic_cast does not work across module (exe, dll, etc) boundaries in general, while qobject_cast
do work as expected. That's why I decided to inherit my error classes from QObject.
In general error checking in asynchronous API look like this:
|
explicit |
|
virtual |
If you want to throw an exception that corresponds to a recrived EverCloudExceptionData descendant than call this function. Do not use throw
statement, it's not polymorphic.
Reimplemented in qevercloud::EDAMSystemExceptionAuthExpiredData, qevercloud::EDAMSystemExceptionRateLimitReachedData, qevercloud::EvernoteExceptionData, qevercloud::EDAMNotFoundExceptionData, qevercloud::EDAMSystemExceptionData, qevercloud::EDAMUserExceptionData, and qevercloud::ThriftExceptionData.
QString qevercloud::EverCloudExceptionData::errorMessage |
Contains an error message. It's the std::exception::what() counterpart.