view hglib/error.py @ 152:0808bb03add5

util: don't try to use itertools.izip under Python 3 (issue4520) In Python 3, itertools.izip became builtins.zip.
author Brett Cannon <brett@python.org>
date Fri, 20 Mar 2015 16:32:53 -0400
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