docs: def add_error(name=None, code=None, status=None):
      """Create a new Exception class"""
      if not name or not status or not code:
          raise Exception("Can't create Exception class %s: you must set both name, status and code" % name)
      myexception = type(name, (PyMacaronException, ), {"code": code, "status": status})
      globals()[name] = myexception
      if code in code_to_class:
          raise Exception("ERROR! Exception %s is already defined." % code)
      code_to_class[code] = myexception
      return myexception