I haven't seen the ANSI exceptions standard. How does your approach differ?
The ANSI standard exposes the situations in the programming interface. It requires a separate class for each situation, which I think is overkill.
My approach uses instances of a single class to model situations, and refers to them in the programming interface only by name. The message interface is oriented toward blocks for handler setup (>>valueHandling:, etc.), and toward the current context for handling requests (>>handle:, etc.). In all, I think my approach is lighter and easier to use.
thanks,
-C
-- Craig Latta composer and computer scientist craig.latta@netjam.org www.netjam.org latta@interval.com Smalltalkers do: [:it | All with: Class, (And love: it)]
Actually, the standard leaves the door open for both class and instance based exception handling. Dolphin has done a nice job of implementing such a scheme. I agree that the instance based method is preferable, but providing support for both is the best compromise. Also, an instance based approach doesn't preclude subclassing to provide more specific behavior.
- Stephen
-----Original Message----- From: Craig Latta [mailto:Craig.Latta@NetJam.ORG] Sent: Wednesday, March 03, 1999 4:34 PM To: Andrew C. Greenberg Cc: squeak@cs.uiuc.edu Subject: re: exception handling, differences from ANSI
I haven't seen the ANSI exceptions standard. How does your approach differ?
The ANSI standard exposes the situations in the programming interface. It requires a separate class for each situation, which I think is overkill.
My approach uses instances of a single class to model situations, and refers to them in the programming interface only by name. The message interface is oriented toward blocks for handler setup (>>valueHandling:, etc.), and toward the current context for handling requests (>>handle:, etc.). In all, I think my approach is lighter and easier to use.
thanks,
-C
-- Craig Latta composer and computer scientist craig.latta@netjam.org www.netjam.org latta@interval.com Smalltalkers do: [:it | All with: Class, (And love: it)]
squeak-dev@lists.squeakfoundation.org