RE: suppression of new error
Steve Barnes <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <VI1PR03MB4479385A6415E009D93AE4719B050@VI1PR03MB4479.eurprd03.prod.outlook.com> |
Those errors (and similar ones for Horizontal)) result from using alignment flags, (I.e. wx.Top, wx.Bottom, wx.Centre, etc.) along with wx.Expand. It is normally reasonably quick to locate the occurrences of these in your source code. (I got caught out with this and had to do a bulk update on my code. 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. Steve Barnes From: Karsten Hilbert<mailto:[email protected]> Sent: 14 October 2020 17:32 To: [email protected]<mailto:[email protected]> Subject: Re: [wxPython-users] suppression of new error On Wed, Oct 14, 2020 at 03:46:12PM +0000, wxp-users wrote: > We are seeing a new class of error in our code with wx4.1.0: > > > /tmp/pip-build-gvydcwjt/wxpython/ext/wxWidgets/src/common/sizer.cpp(2114) > > in DoInsert(): Vertical alignment flags are ignored with wxEXPAND > > > /tmp/pip-build-gvydcwjt/wxpython/ext/wxWidgets/src/common/sizer.cpp(2077) > > in DoInsert(): Vertical alignment flags are ignored in vertical sizers > > These are clearly problems in our code due to sloppy (or poorly understood, or both) use of flags in Sizer.Add() and we will need to track them down. The problem we face is that they throw exceptions, which is not desirable in the hands of users. Is there a way that we can suppress this or at least downgrade this to a warning — other than for the developers? If those are, indeed, Exceptions you might add a (top-pish level) exception handler and just log them ? This sort of thing might help, perhaps: (wx.App).SetAssertMode(wx.APP_ASSERT_EXCEPTION | wx.APP_ASSERT_LOG) 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/20201014163239.GD26913%40hermes.hilbert.loc. -- 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/VI1PR03MB4479385A6415E009D93AE4719B050%40VI1PR03MB4479.eurprd03.prod.outlook.com.