18 #ifndef QGSSERVEREXCEPTION_H 19 #define QGSSERVEREXCEPTION_H 25 #include "qgis_server.h" 39 class SERVER_EXPORT QgsServerException
44 QgsServerException(
const QString &message,
int responseCode = 500 );
59 virtual QByteArray formatResponse( QString &responseFormat
SIP_OUT )
const;
79 class SERVER_EXPORT QgsOgcServiceException
84 QgsOgcServiceException(
const QString &code,
const QString &message,
const QString &locator = QString(),
85 int responseCode = 200,
const QString &version = QStringLiteral(
"1.3.0" ) );
88 QString
message()
const {
return mMessage; }
91 QString
code()
const {
return mCode; }
94 QString
locator()
const {
return mLocator; }
97 QString
version()
const {
return mVersion; }
99 QByteArray formatResponse( QString &responseFormat
SIP_OUT )
const override;
126 : QgsOgcServiceException( code, message, locator, 400 )
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 base class for service exceptions.
QString message() const
Returns the exception message.
QString version() const
Returns the exception version.
QString locator() const
Returns the locator.
Exception base class for server exceptions.
QString code() const
Returns the exception code.
Defines a QGIS exception class.