• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

exception.h

00001 /*
00002     Copyright (c) 2009 Volker Krause <vkrause@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or modify it
00005     under the terms of the GNU Library General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or (at your
00007     option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful, but WITHOUT
00010     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012     License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to the
00016     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301, USA.
00018 */
00019 
00020 #ifndef AKONADI_EXCEPTION_H
00021 #define AKONADI_EXCEPTION_H
00022 
00023 #include "akonadi_export.h"
00024 
00025 #include <QtCore/QByteArray>
00026 #include <exception>
00027 
00028 class QString;
00029 
00030 namespace Akonadi {
00031 
00035 class AKONADI_EXPORT Exception : public std::exception
00036 {
00037   public:
00041     Exception( const char *what ) throw();
00042 
00046     Exception( const QByteArray &what ) throw();
00047 
00051     Exception( const QString &what ) throw();
00052 
00056     Exception( const Exception &other ) throw();
00057 
00061     virtual ~Exception() throw();
00062 
00066     const char* what() const throw();
00067 
00071     virtual QByteArray type() const throw();
00072 
00073   private:
00074     class Private;
00075     Private * const d;
00076 };
00077 
00078 #define AKONADI_EXCEPTION_MAKE_TRIVIAL_INSTANCE( classname ) \
00079 class classname : public Akonadi::Exception \
00080 { \
00081   public: \
00082     classname ( const char *what ) throw() : Akonadi::Exception( what ) {} \
00083     classname ( const QByteArray &what ) throw() : Akonadi::Exception( what ) {} \
00084     classname ( const QString &what ) throw() : Akonadi::Exception( what ) {} \
00085     QByteArray type() const throw() { return QByteArray( "Akonadi::" #classname ); } \
00086 }
00087 
00088 AKONADI_EXCEPTION_MAKE_TRIVIAL_INSTANCE( PayloadException );
00089 
00090 #undef AKONADI_EXCEPTION_MAKE_TRIVIAL_INSTANCE
00091 
00092 }
00093 
00094 #endif

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal