| 19 | |
| 20 | |
| 21 | class ApiValueError(OpenApiException, ValueError): |
| 22 | def __init__(self, msg, path_to_item=None) -> None: |
| 23 | """ |
| 24 | Args: |
| 25 | msg (str): the exception message |
| 26 | |
| 27 | Keyword Args: |
| 28 | path_to_item (list) the path to the exception in the |
| 29 | received_data dict. None if unset |
| 30 | """ |
| 31 | |
| 32 | self.path_to_item = path_to_item |
| 33 | full_msg = msg |
| 34 | if path_to_item: |
| 35 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) |
| 36 | super(ApiValueError, self).__init__(full_msg) |
| 37 | |
| 38 | |
| 39 | class ApiAttributeError(OpenApiException, AttributeError): |
no outgoing calls
no test coverage detected