Mercurial > hg
changeset 24217:d2b81256db1e
error: add a new UnknownIdentifier error type
This will be used by the revset and fileset code to communicate more
specific errors to higher levels so that we might be able to offer
suggestions about what function might have been similar.
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 26 Jan 2015 14:31:01 -0500 |
parents | 4bb348ae43cb |
children | cecaec0e8719 |
files | mercurial/error.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/error.py Mon Nov 24 16:42:49 2014 -0500 +++ b/mercurial/error.py Mon Jan 26 14:31:01 2015 -0500 @@ -67,6 +67,15 @@ class ParseError(Exception): """Raised when parsing config files and {rev,file}sets (msg[, pos])""" +class UnknownIdentifier(ParseError): + """Exception raised when a {rev,file}set references an unknown identifier""" + + def __init__(self, function, symbols): + from i18n import _ + ParseError.__init__(self, _("unknown identifier: %s") % function) + self.function = function + self.symbols = symbols + class RepoError(Exception): def __init__(self, *args, **kw): Exception.__init__(self, *args)