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