On 12/18/12 11:45 AM, Shawn Walker wrote:
I think InvalidOptionException needs to be restructured so that it more naturally handles any number of invalid options. In particular, I'd also expect the __verify_args in pkg.client.api to find as many invalid options as it can before raising the related exception. Otherwise, this is satisfactory for the moment, although consumers of this will have to manually scan the options that were found to be invalid in the exception and map those to actual options to make it useful for users. With that in mind, maybe there should be a property to map the options to the consumer's representation. For example:
As we discussed in person, doing the option mapping in the exception is tricky because not all required information might be available. It should work better if we provide the options in the exception itself and the caller can extract and translate them if necessary.
I implemented all the other suggestions. webrev: https://cr.opensolaris.org/action/browse/pkg/erisch/15981296_2/webrev/ incremental: https://cr.opensolaris.org/action/browse/pkg/erisch/15981296_1-2/webrev/ Erik _______________________________________________ pkg-discuss mailing list pkg-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/pkg-discuss