view hglib/error.py @ 205:2d0ec6097d78 2.6.1

util: fix handling of empty short option This one was overlooked at 32e8d51ec16c. A dense form, '-sVALUE', shouldn't be used if an empty value is specified.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 30 Apr 2018 15:43:29 +0900
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