[squeak-dev] Exception handling bug; NameLookupFailure>defaultAction
frank.shearar at gmail.com
Tue Jan 1 05:28:01 UTC 2019
described the fun I had with that method nearly exactly 8 years ago!
On Mon, Dec 31, 2018, 16:48 tim Rowledge <tim at rowledge.org wrote:
> I was taking a swing at fixing the FileBrowser bug caused by the
> non-existence of st.cs.uiuc.edu wherein we get a very annoying loop of
> notifiers and a hard time trying to get out of them. Looking around the
> related code suggests we really want to clean up a lot of methods to do
> with serverdirectory, ftpurl etc.
> The error handling bug is quite simple to trigger for you pleasure and
> amusement (I'm past being amused by it and have gone around enough times
> that I think I can no longer see the wood for the trees)
> NetNameResolver addressForName: 'st.cs.uiuc.edu' timeout: 10.
> should do it for you.
> The problem is that we get to NameLookupFailure>defaultAction (because
> there is no other handler), which uses a UI to ask if the user wants to try
> again (sigh; raising a UI from a system error...) and if the option to
> retry is picked then it sends #restart to the handlerContext - which is not
> set. So far as I can see handlerContext only gets set by sending
> #privHandlerContext: which is only done just *after* the code that we just
> ran to get into trouble. With no set handlerContext we're also in trouble
> if we want to #pass, #return: or even just query #isNested.
> If we use a 'deliberate' handler it works as one might hope
> [NetNameResolver addressForName: 'st.cs.uiuc.edu' timeout: 10] on:
> NameLookupFailure do:[:ex| ex pass].
> So, maybe an edge case that got over-optimised? Like I said, my brain is
> now useless for this and it needs another set of eyes.
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: FSRA: Forms Skip and Run-Away
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev