comparison mercurial/error.py @ 14761:1a9256cdf10f stable

error: Add a hint argument to RepoError This use the same mechanism than Abort. Except clause stay distinct because RepoError add "!" at the end of the message.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 25 Jun 2011 02:30:17 +0200
parents 931a72e00efa
children f4522df38c65
comparison
equal deleted inserted replaced
14760:cebbc6b38c05 14761:1a9256cdf10f
41 41
42 class ParseError(Exception): 42 class ParseError(Exception):
43 'Exception raised when parsing config files (msg[, pos])' 43 'Exception raised when parsing config files (msg[, pos])'
44 44
45 class RepoError(Exception): 45 class RepoError(Exception):
46 pass 46 def __init__(self, *args, **kw):
47 Exception.__init__(self, *args)
48 self.hint = kw.get('hint')
47 49
48 class RepoLookupError(RepoError): 50 class RepoLookupError(RepoError):
49 pass 51 pass
50 52
51 class CapabilityError(RepoError): 53 class CapabilityError(RepoError):