[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] ***UNCHECKED*** Exception: unknown instead of the expected one
From:       Alessandro Pasotti <apasotti () gmail ! com>
Date:       2019-08-06 12:49:00
Message-ID: CAL5Q670uToEC+1SNzU-kwc02DMQHGecj7px_dC+hvpNYCjRKew () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hi,</div><div><br></div><div>I&#39;ve added an exception in the SIP \
file:<br></div><div><br></div><div>%Exception QgsProviderConnectionException(SIP_Exception) \
/PyName=QgsProviderConnectionException/<br>{<br>%TypeHeaderCode<br>#include \
&lt;qgsexception.h&gt;<br>%End<br>%RaiseCode<br>   SIP_BLOCK_THREADS<br>   \
PyErr_SetString(sipException_QgsProviderConnectionException, \
sipExceptionRef.what().toUtf8().constData() );<br>   \
SIP_UNBLOCK_THREADS<br>%End<br>};</div><div><br></div><div>then, in the class \
method:</div><div><br></div><div>virtual void executeSql( const QString &amp;sql) throw( \
QgsProviderConnectionException );</div><div><br></div><div>but when calling from Python I \
always get Exception: unknown, what is possible going \
wrong?</div><div><br></div><div>Thanks</div><div><br></div><div>-- <br><div dir="ltr" \
class="gmail_signature" data-smartmail="gmail_signature">Alessandro Pasotti<br>w3:     <a \
href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic