view hglib/error.py @ 174:c67410c74723

Added tag 2.1 for changeset 8c4d24b58c23
author Matt Mackall <mpm@selenic.com>
date Sat, 16 Apr 2016 18:18:46 -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