Class: QgsServerException¶
-
class
qgis.server.
QgsServerException
(message: str, responseCode: int = 500)¶ Bases:
sip.wrapper
Constructor
QgsServerException(
QgsServerException
)Exception base class for server exceptions.
New in version 3.0.
- Parameters
message (str) –
responseCode –
-
formatResponse
(self) → Tuple[QByteArray, str]¶ Format the exception for sending to client
- Parameters
responseFormat – QString to store the content type of the response format.
- Return type
Tuple[QByteArray, str]
- Returns
QByteArray the fermatted response.
The defaolt implementation return text/xml format.
-
responseCode
(self) → int¶ - Return type
int
- Returns
the return HTTP response code associated with this exception