QGIS/python/server/server.sip.in
Alessandro Pasotti 92ac7a2e93
[server] Server api and WFS3 (#10016)
Implementation of OGC API and WFS3 core draft specification
2019-08-06 16:38:21 +02:00

30 lines
741 B
Plaintext

%Module(name=qgis._server,
keyword_arguments="All")
${DEFAULTDOCSTRINGSIGNATURE}
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Import QtXml/QtXmlmod.sip
%Import core/core.sip
%Include qgsserverexception.sip
%Feature HAVE_SERVER_PYTHON_PLUGINS
%Include server_auto.sip
%VirtualErrorHandler serverapi_badrequest_exception_handler
PyObject *exception, *value, *traceback;
PyErr_Fetch(&exception, &value, &traceback);
SIP_RELEASE_GIL( sipGILState );
QString strVal = "API bad request error";
if ( value && PyUnicode_Check(value) )
{
Py_ssize_t size;
strVal = QString::fromUtf8( PyUnicode_AsUTF8AndSize(value, &size) );
}
throw QgsServerApiBadRequestException( strVal );
%End