akonadi
20 #include "exception.h"
27 using namespace Akonadi;
29 class Exception::Private
40 std::auto_ptr<Private> nd(
new Private);
50 std::auto_ptr<Private> nd(
new Private);
60 std::auto_ptr<Private> nd(
new Private);
61 nd->what = what.toUtf8();
67 : std::exception(other)
74 std::auto_ptr<Private> nd(
new Private(*other.d));
86 static const char mytype[] =
"Akonadi::Exception";
96 static const char fallback[] =
"<some exception was thrown during construction: message lost>";
100 if (d->assembledWhat.isEmpty()) {
104 return "caught some exception while assembling Akonadi::Exception::what() return value";
107 return d->assembledWhat.constData();
110 #define AKONADI_EXCEPTION_IMPLEMENT_TRIVIAL_INSTANCE( classname ) \
111 Akonadi::classname::~classname() throw() {} \
112 QByteArray Akonadi::classname::type() const throw() { \
113 static const char mytype[] = "Akonadi::" #classname ; \
115 return QByteArray::fromRawData( mytype, sizeof (mytype)-1 ); \
117 return QByteArray(); \
121 AKONADI_EXCEPTION_IMPLEMENT_TRIVIAL_INSTANCE(PayloadException)
123 #undef AKONADI_EXCEPTION_IMPLEMENT_TRIVIAL_INSTANCE
QByteArray fromRawData(const char *data, int size)
Exception(const char *what)
Creates a new exception with the error message what.
virtual QByteArray type() const
Returns the type of this exception.
virtual ~Exception()
Destructor.
Base class for exceptions used by the Akonadi library.
const char * what() const
Returns the error message associated with this exception.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.