Sean P. DeNigris
sean at clipperadams.com
Thu Jun 21 21:12:33 EDT 2012
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
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?
View this message in context: http://forum.world.st/badDirectoryPath-tp4635913p4636046.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
More information about the Pharo-dev