On 07/15/10 03:11 PM, Shawn Walker wrote:
On 07/12/10 06:16 PM, Brock Pytlik wrote:
On 07/ 8/10 05:48 PM, Shawn Walker wrote:
...

line 1794: this needs exception handling

So you're worried about the case where 4 lines before, I could create a
file but now I can't remove it? Ok. Would you prefer the Environment
error on removal to surface and hide that there was a file format error
or should the failure to remove the file be hidden and that the file was
in a bad format be shown to the user?

In general, environment errors shouldn't re-surface to callers if they are EROFS, EACCES, or EPERM (they should be re-raised as the appropriate ApiException). If it's a file format error that should be re-raised as a custom API exception as well. If it's an EnvironmentError that we don't have an equivalent API exception for, then for the moemnt simply raising it is best.
Sorry, maybe I didn't phrase the question clearly. Imagine we have a file that both has a bad format and can't be removed (let's say EACCES happened when we tried to remove it). Which would you want to surface out of the function, the api_errors.BadFileFormat exception or the api_errors.FilePermissionException?
[snip]

Cheers,
-SHawn
Thanks,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to