[Exceptions] InvalidDirectoryError non-resumable but resuming

Chris Muller afunkyobject at yahoo.com
Fri Jul 15 18:53:03 UTC 2005


Hi Andreas, I offer a comment.

> Questions: Conceptually, should it even be allowed for a non-resumable 
> exception to do what InvalidDirectoryError does from its defaultAction? 

IMO, no.  I think you have stumbled on an inconsistency, a bug, in
InvalidFileDirectory.

> ... I was curious about general 
> insights on the issue.

However, and this may be naive, but why is the #isResumable check ever really
needed anywhere in the system?  Am I having brain-block at the moment or does
it seem to be nothing more than a mechanism for developers to either keep track
of or trip over.  

Quite simply, if an Error shouldn't be resumed, then don't resume it in your
handler.  But what will the developer do when they do trip over a
non-resumable?  Simple, just trump it by implementing #isResumable to return
false and carry-on (or just use a some kind of Notification).  As Tim pointed
out, many of the Errors are are already doing this anyway, so whats the point?

 - Chris

PS - Personally, I love Squeak's exception mechanism, kudos to Craig for it. 
Particularly the resumable Notifications.  Thanks to #defaultActions, I am able
to run my domain with or without an application controller to handle things
like ProgressNotifications or database TransactionRequests..



More information about the Squeak-dev mailing list