QGIS API Documentation 3.41.0-Master (3440c17df1d)
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 <QString>
25
26#include "qgis_core.h"
27
28
29
34class CORE_EXPORT QgsException
35{
36 public:
37
41 QgsException( const QString &message )
42 : mWhat( message )
43 {}
44
45 // cppcheck-suppress internalAstError
46 virtual ~QgsException() throw() = default;
47
49 QString what() const throw()
50 {
51 return mWhat;
52 }
53
54 private:
55
57 QString mWhat;
58
59};
60
61
66class CORE_EXPORT QgsCsException : public QgsException
67{
68 public:
69
73 QgsCsException( const QString &message ) : QgsException( message ) {}
74
75};
76
82class CORE_EXPORT QgsProcessingException : public QgsException
83{
84 public:
85
89 QgsProcessingException( const QString &message ) : QgsException( message ) {}
90
91};
92
93
101{
102 public:
103
107 QgsProviderConnectionException( const QString &message ) : QgsException( message ) {}
108
109};
110
117class CORE_EXPORT QgsNotSupportedException : public QgsException
118{
119 public:
120
124 QgsNotSupportedException( const QString &message ) : QgsException( message ) {}
125};
126
133class CORE_EXPORT QgsSettingsException : public QgsException
134{
135 public:
136
140 QgsSettingsException( const QString &message ) : QgsException( message ) {}
141
142};
143
144#endif
Custom exception class for Coordinate Reference System related exceptions.
QgsCsException(const QString &message)
Constructor for QgsCsException, with the specified error message.
Defines a QGIS exception class.
virtual ~QgsException()=default
QgsException(const QString &message)
Constructor for QgsException, with the specified error message.
Custom exception class which is raised when an operation is not supported.
QgsNotSupportedException(const QString &message)
Constructor for QgsNotSupportedException, with the specified error message.
Custom exception class for processing related exceptions.
QgsProcessingException(const QString &message)
Constructor for QgsProcessingException, with the specified error message.
Custom exception class for provider connection related exceptions.
QgsProviderConnectionException(const QString &message)
Constructor for QgsProviderConnectionException, with the specified error message.
Custom exception class for settings related exceptions.
QgsSettingsException(const QString &message)
Constructor for QgsProcessingException, with the specified error message.