[Exceptions] InvalidDirectoryError non-resumable but resuming via defaultAction?

Andreas Raab andreas.raab at gmx.de
Thu Jul 14 23:11:40 UTC 2005


Hi -

I just ran into a really weird situation. It seems that 
InvalidDirectoryError is impossible to handle by a client in the same 
way that it implements its defaultAction. In the defaultAction, 
InvalidDirectoryError simply returns an empty array which -for a client- 
would be equivalent to invoking "error resume: #()". But being a 
subclass of Error InvalidDirectoryError is marked non-resumable and 
raises another exception when trying to resume it.

Questions: Conceptually, should it even be allowed for a non-resumable 
exception to do what InvalidDirectoryError does from its defaultAction? 
If so, what (except using #resumeUnchecked: ) is a client supposed to do 
in that situation? It appears that one can also #pass the exception but 
that seems to be a very brittle way of relying on an unchanging default 
behavior of that exception.

Any insights? For now I think I'll #pass but it feels just very wrong.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list