Source code for networkapi.api_ogp.exceptions

# -*- coding: utf-8 -*-
from rest_framework import status
from rest_framework.exceptions import APIException


[docs]class ObjectGroupPermissionError(APIException): status_code = status.HTTP_500_INTERNAL_SERVER_ERROR def __init__(self, msg): self.detail = msg
[docs]class ObjectGroupPermissionNotFoundError(APIException): status_code = status.HTTP_404_NOT_FOUND def __init__(self, msg): self.detail = u'Object Group Permission %s do not exist.' % (msg)
[docs]class ObjectGroupPermissionGeneralError(APIException): status_code = status.HTTP_500_INTERNAL_SERVER_ERROR def __init__(self, msg): self.detail = msg
[docs]class ObjectGroupPermissionGeneralNotFoundError(APIException): status_code = status.HTTP_404_NOT_FOUND def __init__(self, msg): self.detail = u'Object Group Permission General %s do not exist.' % ( msg)
[docs]class ObjectTypeError(APIException): status_code = status.HTTP_500_INTERNAL_SERVER_ERROR def __init__(self, msg): self.detail = msg
[docs]class ObjectTypeNotFoundError(APIException): status_code = status.HTTP_404_NOT_FOUND def __init__(self, msg): self.detail = u'Object Type %s do not exist.' % (msg)