[BUG] improve error messages

Aaron Bentley aaron.bentley at utoronto.ca
Wed Sep 14 21:29:46 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A Meinel wrote:

>>I don't think that anything in branch should throw a CommandError - it
>>hides too much information. Rather I think that the commands run()
>>should catch NotBranchError and convert that to a nice error message.
> 
> 
> Well, at first that is what I thought, too. But I was concerned that
> then *every* command would have to re-implement the same error trapping.
> What about having "find_branch_for_command()" which throws a better set
> of errors?

What I've done is implemented the rethrowing in bzrlib.commands.main.
That should avoid the code duplication.  The problem with
find_branch_for_command is, when do we use it, instead of find_branch?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKIg60F+nu1YWqI0RAiMzAJ9/aZnPQKXC08AiynTt8TPW4hnL5ACfRWsd
PZTc1S4esb+NJS6Lh+GVTWY=
=A+sU
-----END PGP SIGNATURE-----




More information about the bazaar mailing list