libkcal

exceptions.h
1 /*
2  This file is part of libkcal.
3 
4  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KCAL_EXCEPTIONS_H
23 #define KCAL_EXCEPTIONS_H
24 //
25 // Exception classes of libkcal.
26 //
27 // We don't use actual C++ exceptions right now. These classes are currently
28 // returned by an error function, but we can build upon them, if we start
29 // to use C++ exceptions.
30 
31 #include <tqstring.h>
32 
33 namespace KCal {
34 
39 class Exception
40 {
41  public:
45  Exception( const TQString &message = TQString() );
46  virtual ~Exception();
47 
51  virtual TQString message();
52 
53  protected:
54  TQString mMessage;
55 
56  private:
57  class Private;
58  Private *d;
59 };
60 
64 class ErrorFormat : public Exception
65 {
66  public:
81  UserCancel
82  };
83 
87  ErrorFormat( ErrorCodeFormat code, const TQString &message = TQString() );
88 
92  TQString message();
96  ErrorCodeFormat errorCode();
97 
98  private:
99  ErrorCodeFormat mCode;
100 
101  class Private;
102  Private *d;
103 };
104 
105 }
106 
107 #endif
Exception(const TQString &message=TQString())
Construct exception with descriptive message message.
Definition: exceptions.cpp:29
vCalendar v1.0 detected
Definition: exceptions.h:76
Unknown calendar format detected.
Definition: exceptions.h:78
iCalendar v2.0 detected
Definition: exceptions.h:77
ErrorCodeFormat
The different types of Calendar format errors.
Definition: exceptions.h:70
Parse error in libkcal.
Definition: exceptions.h:74
No calendar component found.
Definition: exceptions.h:75
Calendar format related error class.
Definition: exceptions.h:64
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38
No writable resource is available.
Definition: exceptions.h:80
Restriction violation.
Definition: exceptions.h:79
Parse error in libical.
Definition: exceptions.h:73
virtual TQString message()
Return descriptive message of exception.
Definition: exceptions.cpp:38
KOrganizer exceptions base class.
Definition: exceptions.h:39