QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsexception.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsexception.h
3 -------------------
4 begin : August 31, 2004
5 copyright : (C) 2004 by Mark Coletti
6 email : mcoletti at gmail.com
7***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17#ifndef QGSEXCEPTION_H
18#define QGSEXCEPTION_H
19
20#define SIP_NO_CREATION
21
22#define SIP_NO_FILE
23
24#include "qgis_core.h"
25
26#include <QString>
27
32class CORE_EXPORT QgsException
33{
34 public:
35
39 QgsException( const QString &message )
40 : mWhat( message )
41 {}
42
43 // cppcheck-suppress internalAstError
44 virtual ~QgsException() throw() = default;
45
47 QString what() const throw()
48 {
49 return mWhat;
50 }
51
52 private:
53
55 QString mWhat;
56
57};
58
59
64class CORE_EXPORT QgsCsException : public QgsException
65{
66 public:
67
71 QgsCsException( const QString &message ) : QgsException( message ) {}
72
73};
74
80class CORE_EXPORT QgsProcessingException : public QgsException
81{
82 public:
83
87 QgsProcessingException( const QString &message ) : QgsException( message ) {}
88
89};
90
91
99{
100 public:
101
105 QgsProviderConnectionException( const QString &message ) : QgsException( message ) {}
106
107};
108
115class CORE_EXPORT QgsNotSupportedException : public QgsException
116{
117 public:
118
122 QgsNotSupportedException( const QString &message ) : QgsException( message ) {}
123};
124
131class CORE_EXPORT QgsSettingsException : public QgsException
132{
133 public:
134
138 QgsSettingsException( const QString &message ) : QgsException( message ) {}
139
140};
141
142
143#ifdef WITH_SFCGAL
150class CORE_EXPORT QgsSfcgalException : public QgsException
151{
152 public:
153
157 QgsSfcgalException( const QString &message ) : QgsException( message ) {}
158
159};
160#endif
161
169{
170 public:
171
175 QgsInvalidArgumentException( const QString &message )
176 : QgsException( message ) {}
177};
178
179#endif
QgsCsException(const QString &message)
Constructor for QgsCsException, with the specified error message.
Defines a QGIS exception class.
virtual ~QgsException()=default
QString what() const
QgsException(const QString &message)
Constructor for QgsException, with the specified error message.
QgsInvalidArgumentException(const QString &message)
Constructor for QgsInvalidArgumentException, with the specified error message.
QgsNotSupportedException(const QString &message)
Constructor for QgsNotSupportedException, with the specified error message.
QgsProcessingException(const QString &message)
Constructor for QgsProcessingException, with the specified error message.
QgsProviderConnectionException(const QString &message)
Constructor for QgsProviderConnectionException, with the specified error message.
QgsSettingsException(const QString &message)
Constructor for QgsProcessingException, with the specified error message.