akonadi
29class Exception::Private
33 QByteArray assembledWhat;
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";
88 return QByteArray::fromRawData(
"Akonadi::Exception",
sizeof (mytype) - 1);
96 static const char fallback[] =
"<some exception was thrown during construction: message lost>";
100 if (d->assembledWhat.isEmpty()) {
102 d->assembledWhat = QByteArray(
type() +
": " + d->what);
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(); \
121AKONADI_EXCEPTION_IMPLEMENT_TRIVIAL_INSTANCE(PayloadException)
123#undef AKONADI_EXCEPTION_IMPLEMENT_TRIVIAL_INSTANCE
Base class for exceptions used by the Akonadi library.
virtual QByteArray type() const
Returns the type of this exception.
Exception(const char *what)
Creates a new exception with the error message what.
virtual ~Exception()
Destructor.
const char * what() const
Returns the error message associated with this exception.
FreeBusyManager::Singleton.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by
doxygen 1.9.5 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.