Brock Pytlik wrote:
Shawn Walker wrote:
As such, if you can't use an api_error here, you should consider
creating a custom exception and then having the calling client api
code re-raise the exception as one of its own so that the client can
exit cleanly. Even if this case should never happen, our client
should not traceback when encountering known error cases.
I disagree. If it's going to be an issue, I'll change the code to check
one value and default to the other. I put the assertion in as a check
against future versions. I don't think adding more exception pumbling
around this bit of code is appropriate.
Put another way, I don't think it's agreeable to put code in that will
knowingly cause the client to traceback if a particular error case occurs.
However you want to handle it so that the client won't traceback is fine
with me.
The problem with assertions is that they're meant for developers but
users inevitably trigger them.
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss