At file:///home/pqm/archives/thelove/bzr/%2Btrunk/ ------------------------------------------------------------ revno: 3897 revision-id: [email protected] parent: [email protected] parent: [email protected] committer: Canonical.com Patch Queue Manager <[email protected]> branch nick: +trunk timestamp: Fri 2008-12-12 01:24:50 +0000 message: (mbp) Developer documentation about when to add new exception classes modified: doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c ------------------------------------------------------------ revno: 3882.4.2 revision-id: [email protected] parent: [email protected] committer: Martin Pool <[email protected]> branch nick: doc-hacking timestamp: Thu 2008-12-11 16:43:41 -0800 message: Tweak documentation of exception classes modified: doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c ------------------------------------------------------------ revno: 3882.4.1 revision-id: [email protected] parent: [email protected] committer: Martin Pool <[email protected]> branch nick: doc-hacking timestamp: Thu 2008-12-11 16:23:06 -0800 message: Developer documentation about when to add new exception classes modified: doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c === modified file 'doc/developers/HACKING.txt' --- a/doc/developers/HACKING.txt 2008-12-09 09:22:11 +0000 +++ b/doc/developers/HACKING.txt 2008-12-12 01:24:50 +0000 @@ -886,6 +886,17 @@ that exception specifically, or when it needs a substantially different format string. +#. If it is something that a caller can recover from, a custom exception + is reasonable. + +#. If it is a data consistency issue, using a builtin like + ``ValueError``/``TypeError`` is reasonable. + +#. If it is a programmer error (using an api incorrectly) + ``AssertionError`` is reasonable. + +#. Otherwise, use ``BzrError`` or ``InternalBzrError``. + Exception strings should start with a capital letter and should not have a final fullstop. If long, they may contain newlines to break the text.
-- bazaar-commits mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/bazaar-commits
