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 };
00099
00106 explicit ErrorFormat( ErrorCodeFormat code,
00107 const QString &message = QString() );
00108
00112 ~ErrorFormat();
00113
00117 QString message();
00118
00122 ErrorCodeFormat errorCode();
00123
00124 private:
00125
00126 Q_DISABLE_COPY( ErrorFormat )
00127 class Private;
00128 Private *const d;
00129
00130 };
00131
00132 }
00133
00134 #endif