QGIS API Documentation  2.99.0-Master (23ddace)
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 #include <QString>
23 
24 #include "qgis_core.h"
25 
26 
27 
31 class CORE_EXPORT QgsException
32 {
33  public:
34 
38  QgsException( const QString &message )
39  : mWhat( message )
40  {}
41 
42  virtual ~QgsException() throw()
43  {}
44 
46  QString what() const throw()
47  {
48  return mWhat;
49  }
50 
51  private:
52 
54  QString mWhat;
55 
56 };
57 
58 
62 class CORE_EXPORT QgsCsException : public QgsException
63 {
64  public:
65 
69  QgsCsException( const QString &message ) : QgsException( message ) {}
70 
71 };
72 
79 class CORE_EXPORT QgsProcessingException : public QgsException
80 {
81  public:
82 
86  QgsProcessingException( const QString &message ) : QgsException( message ) {}
87 
88 };
89 
90 #endif
QgsCsException(const QString &message)
Constructor for QgsCsException, with the specified error message.
Definition: qgsexception.h:69
QString what() const
Definition: qgsexception.h:46
QgsException(const QString &message)
Constructor for QgsException, with the specified error message.
Definition: qgsexception.h:38
virtual ~QgsException()
Definition: qgsexception.h:42
Custom exception class for processing related exceptions.
Definition: qgsexception.h:79
QgsProcessingException(const QString &message)
Constructor for QgsProcessingException, with the specified error message.
Definition: qgsexception.h:86
Custom exception class for Coordinate Reference System related exceptions.
Definition: qgsexception.h:62
Defines a QGIS exception class.
Definition: qgsexception.h:31