[PyQt] Segfault on exceptions in QNetworkAccessManager::createRequest

Kovid Goyal kovid at kovidgoyal.net
Fri Sep 26 06:31:20 BST 2014

On Fri, Sep 26, 2014 at 06:55:43AM +0200, Florian Bruhin wrote:
> Why a print?
> Why not just *raise the exception* so the configured exception handler
> gets invoked (for me that is a crash dialog where the user can report
> the crash and restart, with their data emergency-saved).

Because most projects dont have a native exception handler. And note
that this cannot be a python exception, since control at the end of the
function returns to native code, not the python VM. 

The correct solution is for application developers to add exception
handling in their implementation in python. The discussion here is about
the best way to prompt them to do that. 

IMO a segfault is hostile and harder to debug. A print and return False 
or qFatal() is much easier than a segfault.



Dr. Kovid Goyal 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140926/8ff198b8/attachment.sig>

More information about the PyQt mailing list