Re: suppression of new error
Karsten Hilbert <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Oct 14, 2020 at 06:23:36PM +0000, Steve Barnes wrote: > Personally, since they are errors raised from the C++ > wxWidgets code, (rather than python exceptions), I thought > that it was better to fix the problem rather than potentially > suppressing other errors along with this one. My suggestion went more into the direction of trying to turn them into exceptions and log them so a) you can fix them and b) users don't have to deal with them. I wondered whether (wx.App).SetAssertMode(wx.APP_ASSERT_EXCEPTION | wx.APP_ASSERT_LOG) would help with that. OTOH, you said that they already _are_ exceptions: > The problem we face is that they throw exceptions, which is > not desirable in the hands of users. in which case you could setup a top-level exception handler, check for the exception type, log it if it is a relevant one, or else re-raise the exception. Other than that I fear there might not be a way. https://discuss.wxpython.org/t/is-there-a-way-to-suppress-these-warning-messages/30727 Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/20201014231554.GB1364%40hermes.hilbert.loc.