| 47 | |
| 48 | |
| 49 | class ApiValueError(OpenApiException, ValueError): |
| 50 | def __init__(self, msg, path_to_item=None): |
| 51 | """ |
| 52 | Args: |
| 53 | msg (str): the exception message |
| 54 | |
| 55 | Keyword Args: |
| 56 | path_to_item (list) the path to the exception in the |
| 57 | received_data dict. None if unset |
| 58 | """ |
| 59 | |
| 60 | self.path_to_item = path_to_item |
| 61 | full_msg = msg |
| 62 | if path_to_item: |
| 63 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) |
| 64 | super(ApiValueError, self).__init__(full_msg) |
| 65 | |
| 66 | |
| 67 | class ApiAttributeError(OpenApiException, AttributeError): |
no outgoing calls
no test coverage detected