QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgswmsserviceexception.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsserviceexception.h
3  ------------------------
4  begin : June 13, 2006
5  copyright : (C) 2006 by Marco Hugentobler
6  email : marco dot hugentobler at karto dot baug dot ethz dot ch
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 QGSWMSSERVICEEXCEPTION_H
19 #define QGSWMSSERVICEEXCEPTION_H
20 
21 #include <QString>
22 
23 #include "qgsserverexception.h"
24 
25 namespace QgsWms
26 {
27 
42  {
43  public:
44 
52  QgsServiceException( const QString &code, const QString &message, const QString &locator = QString(),
53  int responseCode = 200 )
54  : QgsOgcServiceException( code, message, locator, responseCode, QStringLiteral( "1.3.0" ) )
55  {}
56 
63  QgsServiceException( const QString &code, const QString &message, int responseCode )
64  : QgsOgcServiceException( code, message, QString(), responseCode, QStringLiteral( "1.3.0" ) )
65  {}
66 
67  };
68 
76  {
77  public:
78 
85  QgsSecurityException( const QString &message, const QString &locator = QString() )
86  : QgsServiceException( QStringLiteral( "Security" ), message, locator, 403 )
87  {}
88  };
89 
97  {
98  public:
99 
106  QgsBadRequestException( const QString &code, const QString &message, const QString &locator = QString() )
107  : QgsServiceException( code, message, locator, 400 )
108  {}
109  };
110 } // namespace QgsWms
111 
112 #endif
QString locator() const
Returns the locator.
Exception base class for service exceptions.
int responseCode() const
QgsSecurityException(const QString &message, const QString &locator=QString())
Constructor for QgsSecurityException (HTTP error code 403 with Security code name).
Exception thrown in case of malformed request.
QgsBadRequestException(const QString &code, const QString &message, const QString &locator=QString())
Constructor for QgsBadRequestException (HTTP error code 400).
Exception class for WMS service exceptions.
Median cut implementation.
QgsServiceException(const QString &code, const QString &message, int responseCode)
Constructor for QgsServiceException (empty locator attribute).
Exception thrown when data access violates access controls.
QString code() const
Returns the exception code.
QgsServiceException(const QString &code, const QString &message, const QString &locator=QString(), int responseCode=200)
Constructor for QgsServiceException.
QString message() const
Returns the exception message.