KCalendarCore

exceptions.cpp
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 /**
9  @file
10  This file is part of the API for handling calendar data and
11  defines the Exception class.
12 
13  We don't use actual C++ exceptions right now. These classes are currently
14  returned by an error function; but we can build upon them, if/when we start
15  to use C++ exceptions.
16 
17  @brief
18  Exception base class.
19 
20  @author Cornelius Schumacher <[email protected]>
21 */
22 
23 #include "exceptions.h"
24 #include "calformat.h"
25 
26 using namespace KCalendarCore;
27 
28 namespace KCalendarCore
29 {
30 class ExceptionPrivate
31 {
32 public:
33  /**
34  The current exception code.
35  */
37 
38  /** Arguments to pass to i18n(). */
39  QStringList mArguments;
40 };
41 
42 }
43 
44 Exception::Exception(const ErrorCode code, const QStringList &arguments)
45  : d(new ExceptionPrivate)
46 {
47  d->mCode = code;
48  d->mArguments = arguments;
49 }
50 
52 {
53 }
54 
56 {
57  return d->mCode;
58 }
59 
61 {
62  return d->mArguments;
63 }
virtual ~Exception()
Destructor.
Definition: exceptions.cpp:51
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
This file is part of the API for handling calendar data and defines the Exception class...
Exception(const ErrorCode code, const QStringList &arguments=QStringList())
Construct an exception.
Definition: exceptions.cpp:44
ErrorCode
The different types of error codes.
Definition: exceptions.h:47
virtual QStringList arguments() const
Returns the arguments.
Definition: exceptions.cpp:60
virtual ErrorCode code() const
Returns the error code.
Definition: exceptions.cpp:55
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Apr 10 2021 22:50:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.