QGIS API Documentation  2.99.0-Master (7d4f81d)
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 
33 class CORE_EXPORT QgsException
34 {
35  public:
36 
40  QgsException( const QString &message )
41  : mWhat( message )
42  {}
43 
44  virtual ~QgsException() throw()
45  {}
46 
48  QString what() const throw()
49  {
50  return mWhat;
51  }
52 
53  private:
54 
56  QString mWhat;
57 
58 };
59 
60 
64 class CORE_EXPORT QgsCsException : public QgsException
65 {
66  public:
67 
71  QgsCsException( const QString &message ) : QgsException( message ) {}
72 
73 };
74 
81 class CORE_EXPORT QgsProcessingException : public QgsException
82 {
83  public:
84 
88  QgsProcessingException( const QString &message ) : QgsException( message ) {}
89 
90 };
91 
92 #endif
QgsCsException(const QString &message)
Constructor for QgsCsException, with the specified error message.
Definition: qgsexception.h:71
QString what() const
Definition: qgsexception.h:48
QgsException(const QString &message)
Constructor for QgsException, with the specified error message.
Definition: qgsexception.h:40
virtual ~QgsException()
Definition: qgsexception.h:44
Custom exception class for processing related exceptions.
Definition: qgsexception.h:81
QgsProcessingException(const QString &message)
Constructor for QgsProcessingException, with the specified error message.
Definition: qgsexception.h:88
Custom exception class for Coordinate Reference System related exceptions.
Definition: qgsexception.h:64
Defines a QGIS exception class.
Definition: qgsexception.h:33