i think, if you rename #ifAbsent: to #ifNotAvail: then things can fit to their place :) Not available = due to error/permissions/not exists .. Absent = not exists/missing On 22 June 2012 03:12, Sean P. DeNigris <sean@clipperadams.com> wrote:
It seems like the primitive is not returning enough context. badDirectoryPath is a catch-all for any error.
For example, if you send #entries to aFileReference on a directory where you don't have enough permissions, you get #badDirectoryPath. Besides being misleading - the path is not really "bad" - it's hard to deal with the error because it's so general. For example, DiskStore>>directoryAt:ifAbsent:nodesDo: has a bug (http://code.google.com/p/pharo/issues/detail?id=6122)...     ...     entry := Primitives lookupEntryIn: encodedPathString index: index.     entry = #badDirectoryPath         ifTrue: [ ^ absentBlock value ].     ...
So if the entry exists but the primitive fails (e.g. not enough permissions), the absentBlock is evaluated. It's easy enough to fix, but how would you signal a helpful error?
Cheers, Sean
-- View this message in context: http://forum.world.st/badDirectoryPath-tp4635913p4636046.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.