[sugar] Re: where to base?
Dave Jones
davej at redhat.com
Fri Oct 20 13:38:40 EDT 2006
Marco Pesenti Gritti wrote:
> raise ValueError("address must be a unicode string.")
> ValueError: address must be a unicode string.
In cases like these, I always raise the exception like:
if not isinstance(address, unicode):
raise ValueError("address must be a unicode string, not %r" % address)
This tends to make tracebacks much more useful.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Sugar-devel
mailing list