Mercurial > public > mercurial-scm > hg-stable
diff mercurial/error.py @ 45678:bd2df58366b1
errors: name arguments to CommandError constructor
Because readability counts.
Differential Revision: https://phab.mercurial-scm.org/D9164
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 06 Oct 2020 20:37:35 -0700 |
parents | bdd2cdf9e248 |
children | 65e2b64670b5 |
line wrap: on
line diff
--- a/mercurial/error.py Tue Oct 06 21:52:27 2020 -0700 +++ b/mercurial/error.py Tue Oct 06 20:37:35 2020 -0700 @@ -100,6 +100,11 @@ class CommandError(Exception): """Exception raised on errors in parsing the command line.""" + def __init__(self, command, message): + self.command = command + self.message = message + super(CommandError, self).__init__() + __bytes__ = _tobytes