[squeak-dev] nil in an exception handler?

Frank Shearar frank.shearar at gmail.com
Tue Aug 13 21:28:23 UTC 2013


My update-image script has the approximate shape

    ["Do a lot of stuff"]
     WorldState addDeferredUIMessage: [SmalltalkImage current
snapshot: true andQuit: true]]
        on: Error
        do: [| e |
               FileStream stderr nextPutAll: 'Exception ' , e
className , ' raised:'; lf;
                 nextPutAll: e messageText; lf;
                 flush.
               Smalltalk snapshot: false andQuit: true]

and I'm seeing

Exception UndefinedObject raised:
UndefinedObject>>messageText

in my output. Which means, according to my eyes at least, that the
#on:do: handler is getting not an Error, but nil. That just boggles my
mind.

What should I look for to try figure out what's going wrong?

frank


More information about the Squeak-dev mailing list