Blame exception.py

05525d
05525d
b838e2
class HttpForbidden(Exception):
b838e2
  pass
b838e2
05525d
class HttpNotFound(Exception):
05525d
  pass
05525d
b838e2
b838e2
class ModelException(Exception):
b838e2
  pass
b838e2
b838e2
class ModelDeny(ModelException):
05525d
  pass
b838e2
b838e2
class ModelWrongData(ModelException):
b838e2
  def __init__(self, messages = None):
b838e2
    if messages is None:
b838e2
      messages = list()
b838e2
    if type(messages) is str:
b838e2
      messages = [messages]
b838e2
    assert(type(messages) is list)
b838e2
    self.messages = messages
b838e2
b838e2
b838e2
class ActionError(Exception):
b838e2
  def __init__(self, messages = None):
b838e2
    if messages is None:
b838e2
      messages = list()
b838e2
    if type(messages) is str:
b838e2
      messages = [messages]
b838e2
    assert(type(messages) is list)
b838e2
    self.messages = messages
b838e2