
class OrderException(Exception):
    def __init__(self, code, descr=""):
        super(OrderException, self).__init__("Error code: {0}; Error description: {1}".format(code, descr))
        self._code = int(code)
        self._descr = descr

    def get_code(self):
        return self._code

    def get_description(self):
        return self._descr

class TableServiceException(OrderException):
    def __init__(self, errmsg=""):
        super(TableServiceException, self).__init__("-1", "Table Service - {0}".format(errmsg))
