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