Mercurial > public > mercurial-scm > hg
comparison mercurial/error.py @ 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 | 903c7e8c97ad |
children | 8de7d1d937b3 |
comparison
equal
deleted
inserted
replaced
24216:4bb348ae43cb | 24217:d2b81256db1e |
---|---|
64 class OutOfBandError(Exception): | 64 class OutOfBandError(Exception): |
65 """Exception raised when a remote repo reports failure""" | 65 """Exception raised when a remote repo reports failure""" |
66 | 66 |
67 class ParseError(Exception): | 67 class ParseError(Exception): |
68 """Raised when parsing config files and {rev,file}sets (msg[, pos])""" | 68 """Raised when parsing config files and {rev,file}sets (msg[, pos])""" |
69 | |
70 class UnknownIdentifier(ParseError): | |
71 """Exception raised when a {rev,file}set references an unknown identifier""" | |
72 | |
73 def __init__(self, function, symbols): | |
74 from i18n import _ | |
75 ParseError.__init__(self, _("unknown identifier: %s") % function) | |
76 self.function = function | |
77 self.symbols = symbols | |
69 | 78 |
70 class RepoError(Exception): | 79 class RepoError(Exception): |
71 def __init__(self, *args, **kw): | 80 def __init__(self, *args, **kw): |
72 Exception.__init__(self, *args) | 81 Exception.__init__(self, *args) |
73 self.hint = kw.get('hint') | 82 self.hint = kw.get('hint') |