mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
30 lines
741 B
Plaintext
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
|