On 08/20/10 03:15 PM, Brock Pytlik wrote:
On 08/20/10 03:08 PM, [email protected] wrote:
On Fri, Aug 20, 2010 at 02:58:16PM -0700, Brock Pytlik wrote:
Webrev:
http://cr.opensolaris.org/~bpytlik/ips-16854-v1/
That exception handler will catch almost every single exception that
gets raised by the pkg framework. Is this intentional? You're not
going to differentiate your error messages based upon the type of
execption that gets raised?

-j
Aren't the error messages differentiated by the type of error raised?
Ie, they have different str methods, that's what I'm depending on. At
least as a first pass, I think that's a reasonable approximation to
take, after all, that's how the api exceptions are supposed to be
constructed.

If that doesn't satisfy your concerns, can you elaborate on what the
concern is?

I have to agree with Brock. I don't think it's generally useful to catch specific ApiException classes unless I need to differentiate behavoiur based on the type of exception. Because I'm a consumer of the API, I generally expect almost any kind of APIException to be raised. Since each class also provides a suitable error message (generally speaking), I shouldn't need to do anything more.

-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to