[PyQt] Exceptions in Python Implementations of Virtuals

Florian Bruhin me at the-compiler.org
Wed Oct 1 09:05:38 BST 2014


* Phil Thompson <phil at riverbankcomputing.com> [2014-10-01 08:53:10 +0100]:
> Of course qFatal() only aborts the application if you are using the default
> message handler. There is nothing to stop you doing exactly what you would
> do with sys.excepthook and you would also catch any calls from within Qt.

If this can easily be overrided by setting sys.excepthook, big +1 for
it from me.

Applications with a custom exception handler won't break, and
applications without a handler (which are already broken) will fail
loudly rather than silently, just like anything else in Python.

Still I think qFatal should be used (even when sys.excepthook is set)
in the few places known to cause segfaults otherwise. An exception
message and qFatal is still better than a segfault without any message
(and random coredump).

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141001/bd821f07/attachment-0001.sig>


More information about the PyQt mailing list