1 | /* |
2 | This file is part of the kcalcore library. |
3 | |
4 | Copyright (c) 2001 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 | @file |
23 | This file is part of the API for handling calendar data and |
24 | defines the Exception class. |
25 | |
26 | We don't use actual C++ exceptions right now. These classes are currently |
27 | returned by an error function; but we can build upon them, if/when we start |
28 | to use C++ exceptions. |
29 | |
30 | @brief |
31 | Exception base class. |
32 | |
33 | @author Cornelius Schumacher \<schumacher@kde.org\> |
34 | */ |
35 | |
36 | #include "exceptions.h" |
37 | #include "calformat.h" |
38 | |
39 | using namespace KCalCore; |
40 | |
41 | Exception::Exception(const ErrorCode code, const QStringList &arguments) |
42 | : mCode(code), mArguments(arguments), d(0) |
43 | { |
44 | } |
45 | |
46 | Exception::~Exception() |
47 | { |
48 | } |
49 | |
50 | Exception::ErrorCode Exception::code() const |
51 | { |
52 | return mCode; |
53 | } |
54 | |
55 | QStringList Exception::arguments() const |
56 | { |
57 | return mArguments; |
58 | } |
59 | |
60 | /** |
61 | Private class that helps to provide binary compatibility between releases. |
62 | @internal |
63 | */ |
64 | //@cond PRIVATE |
65 | class KCalCore::Exception::Private |
66 | { |
67 | }; |
68 | //@endcond |
69 | |