[MERGE] Produce a traceback for most lock errors

John Arbash Meinel john at arbash-meinel.com
Thu Jan 4 20:43:41 GMT 2007


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

Aaron Bentley wrote:
> Since BzrNewError was removed, all errors are treated as user errors by
> default, rather than internal errors.
> 
> However, most lock errors are internal errors, not user errors.
> 
> This patch turns most lock errors into internal errors, the exceptions
> being lock contention errors and lock-breaking errors.
> 
> Aaron
> 
> BTW, I'm not sure that it was correct to make errors default to user
> errors.  I suspect that user errors are the minority.

I agree that the default should probably be not user errors
(internal_error = True).

However, looking at the code, the default did not change. Prior to
Martin's change we had:


class BzrError
...

  is_user_error = True

And that got changed into:

class BzrError
...
  internal_error = False

Which is the same logic.

At least that is what I found from:
  bzr annotate bzrlib/errors.py --show-ids | view -

and
  bzr annotate -r \
      before:revid:mbp at sourcefrog.net-20061102093721-b606445faedb3fb2 \
      bzrlib/errors.py --show-ids | view -

v- I think we want a space between class level variables.

     _fmt = "Lock error: %(message)s"
+    internal_error = True



Otherwise +1.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFnWb9JdeBCYSNAAMRAnDzAJ99iJL2c/yS0NccdkHJAhU3dKDE1wCgjoxR
UXJDRSQm1SW6bhCrwF4BMQU=
=V/ky
-----END PGP SIGNATURE-----



More information about the bazaar mailing list