[MERGE][Bug #116143] commit raises UnicodeError (traceback) if LANG is incorrect (attempt #3)

Aaron Bentley aaron.bentley at utoronto.ca
Mon Jul 30 15:11:06 BST 2007


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

Daniel Watkins wrote:
> Attached is a fix for #116143 with corrected testing methods (as per
> Aaron's comments).

!tweak

> +        except UnicodeDecodeError:
> +            f.close()
> +            raise BzrError("specified commit message contains characters "
> +                                        "unsupported by the current encoding")

Sorry I didn't notice this earlier, but this should really be raising a
specific exception, e.g. BadCommitMessageEncoding.  Really, the only
place we should be raising generic exceptions is in command classes.

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

iD8DBQFGrfF60F+nu1YWqI0RAgUdAJ0bL3JZ8oS0CSNSHfJl+IF+NA9GvACeIWTt
JRxf2vjv87bX7t0/W4pJUsU=
=mrEi
-----END PGP SIGNATURE-----



More information about the bazaar mailing list