view hglib/error.py @ 79:ca5f8f43e585

branches: more robust parsing strategy The right side of output is more strictly defined than the left, so parse from right to left. This fixes issues with spaces in branch names.
author Matt Mackall <mpm@selenic.com>
date Wed, 09 Nov 2011 16:09:46 -0600
parents 00bb0701323a
children 59cb26bf866e
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 self.err

class ServerError(Exception):
    pass

class ResponseError(ServerError, ValueError):
    pass

class CapabilityError(ServerError):
    pass