2017-06-26 09:57:09 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/server/qgsserverexception.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-11 22:59:27 +01:00
|
|
|
|
|
|
|
class QgsServerException
|
|
|
|
{
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
|
|
|
Exception base class for server exceptions.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-01-11 22:59:27 +01:00
|
|
|
%TypeHeaderCode
|
2017-06-26 09:57:09 +02:00
|
|
|
#include "qgsserverexception.h"
|
2017-01-11 22:59:27 +01:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsServerException( const QString &message, int responseCode = 500 );
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor
|
|
|
|
%End
|
2017-01-11 22:59:27 +01:00
|
|
|
|
|
|
|
int responseCode() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
:return: the return HTTP response code associated with this exception
|
|
|
|
:rtype: int
|
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-11 22:59:27 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
virtual QByteArray formatResponse( QString &responseFormat /Out/ ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Format the exception for sending to client
|
|
|
|
|
|
|
|
:param responseFormat: QString to store the content type of the response format.
|
2017-06-26 09:57:09 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:return: QByteArray the fermatted response.
|
|
|
|
:rtype: QByteArray
|
2017-01-11 22:59:27 +01:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
The defaolt implementation return text/xml format.
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
};
|
2017-01-11 22:59:27 +01:00
|
|
|
|
|
|
|
class QgsOgcServiceException
|
|
|
|
{
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
|
|
|
Exception base class for service exceptions.
|
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Note that this exception is associated with a default return code 200 which may be
|
|
|
|
not appropriate in some situations.
|
2017-06-26 09:57:09 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-01-11 22:59:27 +01:00
|
|
|
%TypeHeaderCode
|
2017-06-26 09:57:09 +02:00
|
|
|
#include "qgsserverexception.h"
|
2017-01-11 22:59:27 +01:00
|
|
|
%End
|
|
|
|
public:
|
2017-06-26 09:57:09 +02:00
|
|
|
QgsOgcServiceException( const QString &code, const QString &message, const QString &locator = QString(),
|
|
|
|
int responseCode = 200, const QString &version = QStringLiteral( "1.3.0" ) );
|
|
|
|
%Docstring
|
|
|
|
Construction
|
|
|
|
%End
|
2017-01-11 22:59:27 +01:00
|
|
|
|
|
|
|
QString message() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
:return: message
|
2017-12-15 10:36:55 -04:00
|
|
|
:rtype: str
|
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
2017-01-11 22:59:27 +01:00
|
|
|
QString code() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
:return: code
|
2017-12-15 10:36:55 -04:00
|
|
|
:rtype: str
|
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
|
|
|
|
2017-01-11 22:59:27 +01:00
|
|
|
QString locator() const;
|
2017-06-26 09:57:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
:return: locator
|
2017-12-15 10:36:55 -04:00
|
|
|
:rtype: str
|
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-11 22:59:27 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
QString version() const;
|
|
|
|
%Docstring
|
|
|
|
return exception version
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
:rtype: str
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-11 22:59:27 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
virtual QByteArray formatResponse( QString &responseFormat /Out/ ) const;
|
|
|
|
%Docstring
|
|
|
|
Overridden from QgsServerException
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
:rtype: QByteArray
|
2017-06-26 09:57:09 +02:00
|
|
|
%End
|
2017-01-11 22:59:27 +01:00
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
};
|
2017-01-11 22:59:27 +01:00
|
|
|
|
|
|
|
|
2017-06-26 09:57:09 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/server/qgsserverexception.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|