timeplus.error

error

This module defines error class
:copyright: (c) 2022 by Timeplus
:license: Apache2, see LICENSE for more details.

View Source
 0"""
 1error
 2
 3This module defines error class  
 4:copyright: (c) 2022 by Timeplus  
 5:license: Apache2, see LICENSE for more details.  
 6"""
 7
 8
 9class TimeplusAPIError(Exception):
10    """Exception raised for errors in the timeplus api.
11
12    Attributes:
13        message -- explanation of the error
14    """
15
16    def __init__(self, method, code, message="failed to call timeplus API"):
17        self.method = method
18        self.code = code
19        self.message = f"http method {method}, response code {code}, {message}"
20        super().__init__(self.message)
#   class TimeplusAPIError(builtins.Exception):
View Source
10class TimeplusAPIError(Exception):
11    """Exception raised for errors in the timeplus api.
12
13    Attributes:
14        message -- explanation of the error
15    """
16
17    def __init__(self, method, code, message="failed to call timeplus API"):
18        self.method = method
19        self.code = code
20        self.message = f"http method {method}, response code {code}, {message}"
21        super().__init__(self.message)

Exception raised for errors in the timeplus api.

Attributes: message -- explanation of the error

#   TimeplusAPIError(method, code, message='failed to call timeplus API')
View Source
17    def __init__(self, method, code, message="failed to call timeplus API"):
18        self.method = method
19        self.code = code
20        self.message = f"http method {method}, response code {code}, {message}"
21        super().__init__(self.message)
Inherited Members
builtins.BaseException
with_traceback
args