QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Types | Public Member Functions | List of all members
QgsWms::QgsServiceException Class Reference

Exception class for WMS service exceptions. More...

#include <qgswmsserviceexception.h>

Inheritance diagram for QgsWms::QgsServiceException:
Inheritance graph
[legend]

Public Types

enum  ExceptionCode {
  OGC_InvalidFormat , OGC_InvalidSRS , OGC_LayerNotDefined , OGC_StyleNotDefined ,
  OGC_LayerNotQueryable , OGC_CurrentUpdateSequence , OGC_InvalidUpdateSequence , OGC_MissingDimensionValue ,
  OGC_InvalidDimensionValue , OGC_InvalidPoint , OGC_InvalidCRS , OGC_OperationNotSupported ,
  QGIS_MissingParameterValue , QGIS_InvalidParameterValue
}
 Exception codes as defined in OGC scpecifications for WMS 1.1.1 and WMS 1.3.0. More...
 

Public Member Functions

 QgsServiceException (const QString &code, const QString &message, const QString &locator=QString(), int responseCode=200)
 Constructor for QgsServiceException. More...
 
 QgsServiceException (const QString &code, const QString &message, int responseCode)
 Constructor for QgsServiceException (empty locator attribute). More...
 
 QgsServiceException (ExceptionCode code, const QgsWmsParameter &parameter, int responseCode)
 Constructor for QgsServiceException (empty locator attribute). More...
 
 QgsServiceException (ExceptionCode code, const QString &message, int responseCode)
 Constructor for QgsServiceException (empty locator attribute). More...
 
- Public Member Functions inherited from QgsOgcServiceException
 QgsOgcServiceException (const QString &code, const QString &message, const QString &locator=QString(), int responseCode=200, const QString &version=QStringLiteral("1.3.0"))
 Construction. More...
 
QString code () const
 Returns the exception code. More...
 
QByteArray formatResponse (QString &responseFormat) const override
 Formats the exception for sending to client. More...
 
QString locator () const
 Returns the locator. More...
 
QString message () const
 Returns the exception message. More...
 
QString version () const
 Returns the exception version. More...
 
- Public Member Functions inherited from QgsServerException
 QgsServerException (const QString &message, int responseCode=500)
 Constructor. More...
 
int responseCode () const
 
- Public Member Functions inherited from QgsException
 QgsException (const QString &message)
 Constructor for QgsException, with the specified error message. More...
 
virtual ~QgsException ()=default throw ()
 
QString what () const throw ()
 

Detailed Description

Exception class for WMS service exceptions.

Since
QGIS 3.0

Definition at line 36 of file qgswmsserviceexception.h.

Member Enumeration Documentation

◆ ExceptionCode

Exception codes as defined in OGC scpecifications for WMS 1.1.1 and WMS 1.3.0.

Some custom QGIS codes are defined too.

Since
QGIS 3.8
Enumerator
OGC_InvalidFormat 
OGC_InvalidSRS 
OGC_LayerNotDefined 
OGC_StyleNotDefined 
OGC_LayerNotQueryable 
OGC_CurrentUpdateSequence 
OGC_InvalidUpdateSequence 
OGC_MissingDimensionValue 
OGC_InvalidDimensionValue 
OGC_InvalidPoint 
OGC_InvalidCRS 
OGC_OperationNotSupported 
QGIS_MissingParameterValue 
QGIS_InvalidParameterValue 

Definition at line 47 of file qgswmsserviceexception.h.

Constructor & Destructor Documentation

◆ QgsServiceException() [1/4]

QgsWms::QgsServiceException::QgsServiceException ( const QString &  code,
const QString &  message,
const QString &  locator = QString(),
int  responseCode = 200 
)
inline

Constructor for QgsServiceException.

Parameters
codeError code name
messageException message to return to the client
locatorLocator attribute according to OGC specifications
responseCodeHTTP error code

Definition at line 73 of file qgswmsserviceexception.h.

◆ QgsServiceException() [2/4]

QgsWms::QgsServiceException::QgsServiceException ( const QString &  code,
const QString &  message,
int  responseCode 
)
inline

Constructor for QgsServiceException (empty locator attribute).

Parameters
codeError code name
messageException message to return to the client
responseCodeHTTP error code

Definition at line 84 of file qgswmsserviceexception.h.

◆ QgsServiceException() [3/4]

QgsWms::QgsServiceException::QgsServiceException ( ExceptionCode  code,
const QString &  message,
int  responseCode 
)
inline

Constructor for QgsServiceException (empty locator attribute).

Parameters
codeError code
messageException message to return to the client
responseCodeHTTP error code
Since
QGIS 3.8

Definition at line 95 of file qgswmsserviceexception.h.

◆ QgsServiceException() [4/4]

QgsWms::QgsServiceException::QgsServiceException ( ExceptionCode  code,
const QgsWmsParameter parameter,
int  responseCode 
)
inline

Constructor for QgsServiceException (empty locator attribute).

Parameters
codeError code
parameterThe WMS parameter on which an error has been detected
responseCodeHTTP error code
Since
QGIS 3.8

Definition at line 106 of file qgswmsserviceexception.h.


The documentation for this class was generated from the following file: