Danek Duvall wrote:
> On Sun, Oct 05, 2008 at 03:55:16AM -0500, Shawn Walker wrote:
> 
>> http://cr.opensolaris.org/~swalker/pkg-3715/
> 
> It might be worthwhile to catch any EnvironmentError raised during history
> writing and emit a sane message rather than letting the exception flow to
> the top.

I've chosen to use a custom exception instead to avoid printing directly 
and changed the client (cli) to handle the exception.

> I also notice that a history exception is completely uncaught, so we don't
> get the nice message about the version of pkg(5) and that a bug should be
> filed, etc.

Yes, and that's my fault.  I just realised that if we have an exception 
in writing the history, the client exception handler will attempt to set 
an operation_result which will result in another exception in trying to 
write out the same operation again.

Not only that, if there are a stack of operations in progress, the 
client isn't going to properly unwind that so I've added a new abort() 
method to history for clients to use in error handling.

I'm also more than annoyed at minidom and the grief it's caused us in 
tracking down certain errors.

As such, I've made several changes to address this and other issues, 
plus what you mentioned.

Updated webrev:
http://cr.opensolaris.org/~swalker/pkg-3715-2/

Diff from last webrev:
http://cr.opensolaris.org/~swalker/pkg-3715-2/v1-v2.patch

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

Reply via email to