QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgswcsserviceexception.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswcsserviceexception.h
3  ------------------------
4  begin : January 17, 2017
5  copyright : (C) 2017 by David Marteau
6  email : david dot marteau at 3liz dot 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 
18 #ifndef QGSWCSSERVICEEXCEPTION_H
19 #define QGSWCSSERVICEEXCEPTION_H
20 
21 #include <QString>
22 
23 #include "qgsserverexception.h"
24 
25 namespace QgsWcs
26 {
27 
35  {
36  public:
37 
44  QgsServiceException( const QString &code, const QString &message,
45  int responseCode = 200 )
46  : QgsOgcServiceException( code, message, QString(), responseCode, QStringLiteral( "1.2.0" ) )
47  {}
48 
56  QgsServiceException( const QString &code, const QString &message, const QString &locator,
57  int responseCode = 200 )
58  : QgsOgcServiceException( code, message, locator, responseCode, QStringLiteral( "1.2.0" ) )
59  {}
60 
61  };
62 
70  {
71  public:
72 
78  QgsSecurityAccessException( const QString &message, const QString &locator = QString() )
79  : QgsServiceException( QStringLiteral( "Security" ), message, locator, 403 )
80  {}
81  };
82 
90  {
91  public:
92 
98  QgsRequestNotWellFormedException( const QString &message, const QString &locator = QString() )
99  : QgsServiceException( QStringLiteral( "RequestNotWellFormed" ), message, locator, 400 )
100  {}
101  };
102 } // namespace QgsWcs
103 
104 #endif
105 
QgsOgcServiceException::locator
QString locator() const
Returns the locator.
Definition: qgsserverexception.h:100
QgsOgcServiceException::code
QString code() const
Returns the exception code.
Definition: qgsserverexception.h:97
QgsWcs::QgsSecurityAccessException::QgsSecurityAccessException
QgsSecurityAccessException(const QString &message, const QString &locator=QString())
Constructor for QgsSecurityAccessException (Security code name).
Definition: qgswcsserviceexception.h:78
QgsWcs::QgsRequestNotWellFormedException::QgsRequestNotWellFormedException
QgsRequestNotWellFormedException(const QString &message, const QString &locator=QString())
Constructor for QgsRequestNotWellFormedException (RequestNotWellFormed code name).
Definition: qgswcsserviceexception.h:98
QgsServerException::responseCode
int responseCode() const
Definition: qgsserverexception.h:55
QgsWcs::QgsServiceException
Exception class for WFS services.
Definition: qgswcsserviceexception.h:35
QgsWcs::QgsRequestNotWellFormedException
Exception thrown in case of malformed request.
Definition: qgswcsserviceexception.h:90
QgsOgcServiceException
Exception base class for service exceptions.
Definition: qgsserverexception.h:83
QgsOgcServiceException::message
QString message() const
Returns the exception message.
Definition: qgsserverexception.h:94
QgsWcs::QgsSecurityAccessException
Exception thrown when data access violates access controls.
Definition: qgswcsserviceexception.h:70
QgsWcs::QgsServiceException::QgsServiceException
QgsServiceException(const QString &code, const QString &message, int responseCode=200)
Constructor for QgsServiceException (empty locator attribute).
Definition: qgswcsserviceexception.h:44
QgsWcs::QgsServiceException::QgsServiceException
QgsServiceException(const QString &code, const QString &message, const QString &locator, int responseCode=200)
Constructor for QgsServiceException.
Definition: qgswcsserviceexception.h:56
qgsserverexception.h
QgsWcs
WCS implementation.
Definition: qgswcs.cpp:30