Fw: Fun with Number readFrom: What should we do ?

Chris Muller chris at funkyobjects.org
Thu Apr 27 18:09:55 UTC 2006


> Maybe a new exception class is better than Error, but i do not take this 
  responsability alone.
   [value1 := Number readfrom: aStream.
     value2 := Number readFrom: aStream]
       on: NumberReadError do: [:exc | global handler block]
 
 Hi Nicolas, I just wanted to say I think your reasoning is compelling and I see nothing wrong with creating a new Error subclass if its really needed.  A lot better than resorting to looking at the messageText in the handler!
 
 You might consider a slightly more generic error, like ParseError or something..

Regards,
   Chris









More information about the Squeak-dev mailing list