equal
deleted
inserted
replaced
309 |
309 |
310 |
310 |
311 class OutOfBandError(RemoteError): |
311 class OutOfBandError(RemoteError): |
312 """Exception raised when a remote repo reports failure""" |
312 """Exception raised when a remote repo reports failure""" |
313 |
313 |
314 def __init__(self, *messages, **kwargs): |
314 def __init__(self, message=None, hint=None): |
315 from .i18n import _ |
315 from .i18n import _ |
316 |
316 |
317 if messages: |
317 if message: |
318 message = _(b"remote error:\n%s") % b''.join(messages) |
|
319 # Abort.format() adds a trailing newline |
318 # Abort.format() adds a trailing newline |
320 message = message.rstrip(b'\n') |
319 message = _(b"remote error:\n%s") % message.rstrip(b'\n') |
321 else: |
320 else: |
322 message = _(b"remote error") |
321 message = _(b"remote error") |
323 super(OutOfBandError, self).__init__(message, **kwargs) |
322 super(OutOfBandError, self).__init__(message, hint=hint) |
324 |
323 |
325 |
324 |
326 class ParseError(Abort): |
325 class ParseError(Abort): |
327 """Raised when parsing config files and {rev,file}sets (msg[, pos])""" |
326 """Raised when parsing config files and {rev,file}sets (msg[, pos])""" |
328 |
327 |