Handling Error will be an improvement. But we don't know the rationale for handling Exception in the first place, if it's for ignoring some Warnings and Errors then changing the handler to Error would break things. I was trying to propose the less risky change, but I'm with you. The right solution is not to make the handler too broad, even handling Error is a bad smell.
On Thu, Mar 31, 2016 at 11:22 AM, Eliot Miranda <[email protected]> wrote: > > > On Mar 31, 2016, at 3:51 AM, Gabriel Cotelli <[email protected]> wrote: > > On the meantime at least change the handler to ignore the halts. > > ... on: Exception - Halt > > Should do the trick > > Can someone say why > ... on: Error > will not improve things? > > Exception - Halt is just /wrong/, less wrong than Exception but still very > wrong. > > _,,,^..^,,,_ (phone) > > On Mar 31, 2016 06:57, "Esteban Lorenzano" <[email protected]> wrote: > >> >> On 30 Mar 2016, at 19:54, Aliaksei Syrel <[email protected]> wrote: >> >> Do anyone really use GLM-Morphic-Brick? >> >> Because it is there just for spotter and will be deleted ASAP. >> >> We know that it is bad. Normal fix requires too many changes... >> >> but catching Exception is bad because it will catch all, even Warnings >> and Halts. >> It would be less bad if it catches Error (not Exception). Still bad, but >> less bad :) >> >> Esteban >> >> On Mar 30, 2016 1:34 PM, "Nicolai Hess" <[email protected]> wrote: >> >>> Please don't do this: >>> >>> updateHeight >>> "no need to care about height, when it's logic is not customized" >>> self layout isHeightCustom ifFalse: [ ^ self ]. >>> [ self bounds: (self brickBounds withHeight: self customHeight) ] >>> on: Exception >>> do: [ "just skip and do nothing" ] >>> >>> This makes debugging GLM/Brick ui/layout code with "self haltOnce" >>> impossible. >>> see >>> GLMBrickGeometryTrait>>#updateHeight >>> GLMBrickGeometryTrait>>#updateWidth >>> >>> And if you log out the raised exception, you see some calls to >>> not initialized fonts and a ZeroDevide and some more errors. >>> The above catch, catches and hides wrong / to late initialized objects. >>> >> >>
