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_DEPRECATED 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 NoWritableFound
00100 };
00101
00108 explicit ErrorFormat( ErrorCodeFormat code,
00109 const QString &message = QString() );
00110
00114 ~ErrorFormat();
00115
00119 QString message();
00120
00124 ErrorCodeFormat errorCode();
00125
00126 private:
00127
00128 Q_DISABLE_COPY( ErrorFormat )
00129 class Private;
00130 Private *const d;
00131
00132 };
00133
00134 }
00135
00136 #endif