diff --git a/python/PyQt6/server/server.sip.in b/python/PyQt6/server/server.sip.in index 2032ffca677f..98c1d70d23ec 100644 --- a/python/PyQt6/server/server.sip.in +++ b/python/PyQt6/server/server.sip.in @@ -21,24 +21,24 @@ ${DEFAULTDOCSTRINGSIGNATURE} PyErr_Fetch(&type, &exception, &traceback); // check whether the object is already a unicode string - QString pyStrException; + QString originalExceptionMessage; if ( PyUnicode_Check( exception) ) { - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); } else { PyObject* str = PyObject_Str( exception ); - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); Py_XDECREF( str ); } SIP_RELEASE_GIL( sipGILState ); QString strException = "API bad request error"; - if ( !pyStrException.isEmpty() ) + if ( !originalExceptionMessage.isEmpty() ) { - strException = pyStrException; + strException = originalExceptionMessage; } throw QgsServerApiBadRequestException( strException ); @@ -50,24 +50,24 @@ ${DEFAULTDOCSTRINGSIGNATURE} PyErr_Fetch(&type, &exception, &traceback); // check whether the object is already a unicode string - QString pyStrException; + QString originalExceptionMessage; if ( PyUnicode_Check( exception) ) { - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); } else { PyObject* str = PyObject_Str( exception ); - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); Py_XDECREF( str ); } SIP_RELEASE_GIL( sipGILState ); QString strException = "Server internal error"; - if ( !pyStrException.isEmpty() ) + if ( !originalExceptionMessage.isEmpty() ) { - strException = pyStrException; + strException = originalExceptionMessage; } throw QgsServerException( strException ); diff --git a/python/server/server.sip.in b/python/server/server.sip.in index 69491f1d2f07..a0c2e4abe4e0 100644 --- a/python/server/server.sip.in +++ b/python/server/server.sip.in @@ -20,24 +20,24 @@ ${DEFAULTDOCSTRINGSIGNATURE} PyErr_Fetch(&type, &exception, &traceback); // check whether the object is already a unicode string - QString pyStrException; + QString originalExceptionMessage; if ( PyUnicode_Check( exception) ) { - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); } else { PyObject* str = PyObject_Str( exception ); - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); Py_XDECREF( str ); } SIP_RELEASE_GIL( sipGILState ); QString strException = "API bad request error"; - if ( !pyStrException.isEmpty() ) + if ( !originalExceptionMessage.isEmpty() ) { - strException = pyStrException; + strException = originalExceptionMessage; } throw QgsServerApiBadRequestException( strException ); @@ -49,24 +49,24 @@ ${DEFAULTDOCSTRINGSIGNATURE} PyErr_Fetch(&type, &exception, &traceback); // check whether the object is already a unicode string - QString pyStrException; + QString originalExceptionMessage; if ( PyUnicode_Check( exception) ) { - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( exception ) ); } else { PyObject* str = PyObject_Str( exception ); - pyStrException = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); + originalExceptionMessage = QString::fromUtf8( PyUnicode_AsUTF8( str ) ); Py_XDECREF( str ); } SIP_RELEASE_GIL( sipGILState ); QString strException = "Server internal error"; - if ( !pyStrException.isEmpty() ) + if ( !originalExceptionMessage.isEmpty() ) { - strException = pyStrException; + strException = originalExceptionMessage; } throw QgsServerException( strException );