[PyQt] Segfault on exceptions in QNetworkAccessManager::createRequest
me at the-compiler.org
Fri Sep 26 05:55:43 BST 2014
* Kovid Goyal <kovid at kovidgoyal.net> [2014-09-26 09:31:48 +0530]:
> On Thu, Sep 25, 2014 at 11:32:47PM +0100, Phil Thompson wrote:
> > I would argue that the alternative of returning an arbitrary QNetworkReply
> > instance (in this case) is worse because it is a bug that would be extremely
> > difficult to detect and isolate. At least with a crash you know where it
> > happened.
> That's what the print is for. If you really want to crash then dont
> segfault, at least use qFatal.
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).
Currently I achieve this by doing something like this:
logging.exception("Error in createRequest")
Then I get the exception in my log, and with the "return False" get a
PyQt exception so my crash dialog shows up.
Long story short - I'd really expect 'raise Exception' in that code to
do the same 'return False' does: raise an exception and *somehow*
prevent a segfault.
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
Size: 819 bytes
Desc: not available
More information about the PyQt