Yucky exceptions

Michael Ellerman michael at ellerman.id.au
Tue Nov 29 08:16:36 GMT 2005


On Tue, 29 Nov 2005 01:59, Martin Pool wrote:
> On 29 Nov 2005, Michael Ellerman <michael at ellerman.id.au> wrote:
> > Hi y'all,
> >
> > When did we start printing the class name in exceptions? I don't like it,
> > it makes it look like a bug, rather than an error, eg:
> >
> > bzr: ERROR: bzrlib.errors.BzrCommandError: No shelf found in branch
> > '/home/michael/src/bzr/test'
> >   at shelf.py line 58
> >   in unshelve
> >
> > I'd prefer:
> >
> > bzr: ERROR: No shelf found in branch '/home/michael/src/bzr/test'
>
> Yes you're right - this was fixed for some errors classes, but now
> should cover all subclasses of BzrError.  Others are assumed to be bugs
> nad reported with a classname and a bit more detail.  I think that's a
> reasonable tradeoff.  You always get a traceback in the log.

Yeah that sounds good. We want to be able to use exceptions for errors 
internally, as well as for actual bugs, but the user should be able to 
differentiate - or we'll be drowning in "bug" reports.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051129/c3c7c5f0/attachment.pgp 


More information about the bazaar mailing list