view hglib/error.py @ 138:a05cdc1579df 1.5

context: handle tip+1 breakage in pre-3.2 default branch Asking for rev(tip+1) could give a null changeset, which broke tests.
author Matt Mackall <mpm@selenic.com>
date Sat, 01 Nov 2014 14:28:56 -0500
parents 59cb26bf866e
children
line wrap: on
line source

class CommandError(Exception):
    def __init__(self, args, ret, out, err):
        self.args = args
        self.ret = ret
        self.out = out
        self.err = err

    def __str__(self):
        return str((self.ret, self.out.rstrip(), self.err.rstrip()))

class ServerError(Exception):
    pass

class ResponseError(ServerError, ValueError):
    pass

class CapabilityError(ServerError):
    pass