File: error.py

package info (click to toggle)
python-hglib 1.4-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 312 kB
  • sloc: python: 2,098; makefile: 20
file content (18 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (40)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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