comparison mercurial/error.py @ 25242:8de7d1d937b3

error: allow a 'hint' to OutOfBandError This will be useful when changing the behavior of OutOfBandError for ssh in the next changeset.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 20 May 2015 18:17:40 -0500
parents d2b81256db1e
children 821e664924dc
comparison
equal deleted inserted replaced
25241:aa36204766e4 25242:8de7d1d937b3
61 class ConfigError(Abort): 61 class ConfigError(Abort):
62 """Exception raised when parsing config files""" 62 """Exception raised when parsing config files"""
63 63
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
67 def __init__(self, *args, **kw):
68 Exception.__init__(self, *args)
69 self.hint = kw.get('hint')
66 70
67 class ParseError(Exception): 71 class ParseError(Exception):
68 """Raised when parsing config files and {rev,file}sets (msg[, pos])""" 72 """Raised when parsing config files and {rev,file}sets (msg[, pos])"""
69 73
70 class UnknownIdentifier(ParseError): 74 class UnknownIdentifier(ParseError):