view hglib/error.py @ 36:00bb0701323a

error: return stderr as __str__ for CommandError
author Idan Kamara <idankk86@gmail.com>
date Mon, 15 Aug 2011 22:46:45 +0300
parents 79f88b4db15f
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