comparison mercurial/error.py @ 15017:f4522df38c65

wireproto: add out-of-band error class to allow remote repo to report errors Older clients will still print the provided error message and not much else: over ssh, this will be each line prefixed with 'remote: ' in addition to an "abort: unexpected response: '\n'"; over http, this will be the '---%<---' banners in addition to the 'does not appear to be a repository' message. Currently, clients with this patch will display 'abort: remote error:\n' and the provided error text, but it is trivial to style the error text however is deemed appropriate.
author Andrew Pritchard <andrewp@fogcreek.com>
date Tue, 02 Aug 2011 15:21:10 -0400
parents 1a9256cdf10f
children 50c922c1b514
comparison
equal deleted inserted replaced
15016:871c77e78f5d 15017:f4522df38c65
36 Exception.__init__(self, *args) 36 Exception.__init__(self, *args)
37 self.hint = kw.get('hint') 37 self.hint = kw.get('hint')
38 38
39 class ConfigError(Abort): 39 class ConfigError(Abort):
40 'Exception raised when parsing config files' 40 'Exception raised when parsing config files'
41
42 class OutOfBandError(Exception):
43 'Exception raised when a remote repo reports failure'
41 44
42 class ParseError(Exception): 45 class ParseError(Exception):
43 'Exception raised when parsing config files (msg[, pos])' 46 'Exception raised when parsing config files (msg[, pos])'
44 47
45 class RepoError(Exception): 48 class RepoError(Exception):