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 <schumacher@kde.org>
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 <schumacher@kde.org>
21*/
22
23#include "exceptions.h"
24#include "calformat.h"
25
26using namespace KCalendarCore;
27
28namespace KCalendarCore
29{
30class ExceptionPrivate
31{
32public:
33 /**
34 The current exception code.
35 */
37
38 /** Arguments to pass to i18n(). */
39 QStringList mArguments;
40};
41
42}
43
44Exception::Exception(const ErrorCode code, const QStringList &arguments)
45 : d(new ExceptionPrivate)
46{
47 d->mCode = code;
48 d->mArguments = arguments;
49}
50
54
56{
57 return d->mCode;
58}
59
61{
62 return d->mArguments;
63}
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
virtual ~Exception()
Destructor.
Exception(const ErrorCode code, const QStringList &arguments=QStringList())
Construct an exception.
virtual QStringList arguments() const
Returns the arguments.
ErrorCode
The different types of error codes.
Definition exceptions.h:47
virtual ErrorCode code() const
Returns the error code.
This file is part of the API for handling calendar data and defines the Exception class.
Namespace for all KCalendarCore types.
Definition alarm.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.