view hglib/error.py @ 135:f6b6e16531f8

Added tag 1.4 for changeset 1b47146a4a2c
author Matt Mackall <mpm@selenic.com>
date Wed, 01 Oct 2014 15:03:32 -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