[email protected] wrote:
On Tue, Apr 14, 2009 at 02:52:31PM -0700, Brock Pytlik wrote:
[email protected] wrote:
On Mon, Apr 13, 2009 at 07:53:07PM -0700, Brock Pytlik wrote:
Webrev:
http://cr.opensolaris.org/~bpytlik/ips-8003-v1/
client/query_parser.py:

  - line 254:  Why is it that this code catches the
    InconsistentIndexException and then throws a new
    InconsistentIndexException with the previous one as its data.
    Wouldn't it just be simpler to eliminate these handlers and let the
    original exception go through?
Notice that it changes from a search_error to an api_error. Because of the joys of generator functions, this was about the only place I could find to reliably catch the search_error.InconsistentIndexException. Does that help clarify things?

Any reason why search_error isn't a subclass of api_error?  It seems
like it would be easier to collapse these exception hierarchies instead
of having identical exceptions with the same names belong to different
modules.  Maybe that's just me, though.

-j

It has to do with keeping the separation between client and server. Everything in client/api_errors.py is a client side exception. The InconsistentIndexException can happen on the server as well. Because of that, in modules common to server and client, we've been raising an error that's not client or server specific, then catching that on the client side and reraising an ApiException.

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

Reply via email to