KCalendarCore

exceptions.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
23 #ifndef KCALCORE_EXCEPTIONS_H
24 #define KCALCORE_EXCEPTIONS_H
25 
26 #include "kcalendarcore_export.h"
27 
28 #include <QString>
29 #include <QStringList>
30 
31 #include <memory>
32 
33 namespace KCalendarCore
34 {
35 
36 class ExceptionPrivate;
37 
42 class KCALENDARCORE_EXPORT Exception
43 {
44 public:
45 
49  enum ErrorCode {
61  SaveErrorOpenFile,
62  SaveErrorSaveFile,
63  LibICalError,
64  VersionPropertyMissing,
65  ExpectedCalVersion2,
66  ExpectedCalVersion2Unknown,
67  ParseErrorNotIncidence,
68  ParseErrorEmptyMessage,
69  ParseErrorUnableToParse,
70  ParseErrorMethodProperty
71  };
72 
80  explicit Exception(const ErrorCode code,
81  const QStringList &arguments = QStringList());
82 
86  virtual ~Exception();
87 
92  Q_REQUIRED_RESULT virtual ErrorCode code() const;
93 
98  Q_REQUIRED_RESULT virtual QStringList arguments() const;
99 
100 private:
101  std::unique_ptr<ExceptionPrivate> d;
102 };
103 
104 } // namespace
105 
106 #endif
No calendar component found.
Definition: exceptions.h:54
iCalendar v2.0 detected
Definition: exceptions.h:56
No writable resource is available.
Definition: exceptions.h:60
User canceled the operation.
Definition: exceptions.h:59
Restriction violation.
Definition: exceptions.h:58
vCalendar v1.0 detected
Definition: exceptions.h:55
Exception base class, currently used as a fancy kind of error code and not as an C++ exception...
Definition: exceptions.h:42
ErrorCode
The different types of error codes.
Definition: exceptions.h:49
Unknown calendar format detected.
Definition: exceptions.h:57
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:51:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.