[PyQt] Exceptions in Python Implementations of Virtuals
phil at riverbankcomputing.com
Tue Sep 30 18:24:57 BST 2014
On 30/09/2014 5:52 pm, Chris Colbert wrote:
> I'm strongly -1 on this.
> I think exceptions should be handled consistently throughout the
I agree, but they aren't at the moment.
> So if you were to make this change for virtual functions, it should
> also be
> made for signal handlers.
> But, user code excepting on the path of a signal
> handler or a virtual event method is very common in my experience, and
> all of these exceptions prohibit the app from continuing to function.
If I get them I consider them a bug in my application.
> Fataling the app, on the other hand, would lead to absolute mayhem on
> production floor.
> Imagine a case where a finance app developer misspells some attribute
> palette and has insufficient test coverage. Crashing the app in the
> of trade execution is a much worse outcome than failing to color the
> edit correctly.
Let me paraphrase what you just said...
An application spends my money. It hasn't been tested. If it has bugs I
don't want to know about them.
> It would be nice to have an easier way than except hooks to be able to
> detect and handle these cases, and I think exploring options in that
> is worthy of discussion. But I think qFatal is certainly the wrong
More information about the PyQt