[PyQt] ***UNCHECKED*** Exception: unknown instead of the expected one

Alessandro Pasotti apasotti at gmail.com
Tue Aug 6 13:49:00 BST 2019


Hi,

I've added an exception in the SIP file:

%Exception QgsProviderConnectionException(SIP_Exception)
/PyName=QgsProviderConnectionException/
{
%TypeHeaderCode
#include <qgsexception.h>
%End
%RaiseCode
  SIP_BLOCK_THREADS
  PyErr_SetString(sipException_QgsProviderConnectionException,
sipExceptionRef.what().toUtf8().constData() );
  SIP_UNBLOCK_THREADS
%End
};

then, in the class method:

virtual void executeSql( const QString &sql) throw(
QgsProviderConnectionException );

but when calling from Python I always get Exception: unknown, what is
possible going wrong?

Thanks

-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190806/091485a9/attachment.html>


More information about the PyQt mailing list