KCal Library
exceptions.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00036 #ifndef KCAL_EXCEPTIONS_H
00037 #define KCAL_EXCEPTIONS_H
00038
00039 #include <QtCore/QString>
00040 #include "kcal_export.h"
00041
00042 namespace KCal {
00043
00048 class Exception
00049 {
00050 public:
00055 explicit Exception( const QString &message = QString() );
00056
00060 virtual ~Exception();
00061
00065 virtual QString message();
00066
00067 protected:
00069 QString mMessage;
00070
00071 private:
00072
00073 Q_DISABLE_COPY( Exception )
00074 class Private;
00075 Private *d;
00076
00077 };
00078
00082 class KCAL_EXPORT ErrorFormat : public Exception
00083 {
00084 public:
00088 enum ErrorCodeFormat {
00089 LoadError,
00090 SaveError,
00091 ParseErrorIcal,
00092 ParseErrorKcal,
00093 NoCalendar,
00094 CalVersion1,
00095 CalVersion2,
00096 CalVersionUnknown,
00097 Restriction,
00098 UserCancel
00099 };
00100
00107 explicit ErrorFormat( ErrorCodeFormat code,
00108 const QString &message = QString() );
00109
00113 ~ErrorFormat();
00114
00118 QString message();
00119
00123 ErrorCodeFormat errorCode();
00124
00125 private:
00126
00127 Q_DISABLE_COPY( ErrorFormat )
00128 class Private;
00129 Private *const d;
00130
00131 };
00132
00133 }
00134
00135 #endif