Source code for dependency_comb.exceptions

"""
Specific application exceptions.
"""


[docs] class DependencyCombBaseException(Exception): """ Exception base. You should never use it directly except for test purpose. Instead make or use a dedicated exception related to the error context. """ pass
[docs] class DependencyCombError(DependencyCombBaseException): """ Basic global error exception. """ pass
[docs] class AnalyzerError(DependencyCombError): """ When parser encounter some erroneus content. """ pass
[docs] class AnalyzerAPIError(DependencyCombError): """ When analyzer encounter an error from a request from API. Attribute ``http_status`` may contains a the HTTP response status code if any. Keyword Arguments: http_status (integer): HTTP response status code. """ def __init__(self, *args, **kwargs): self.http_status = kwargs.pop("http_status", None) super().__init__(*args, **kwargs)
[docs] class RequirementParserError(DependencyCombError): """ When parser encounter invalid syntax on given content. """ pass