Source code for jenkins_pysdk.exceptions


__all__ = ["JenkinsInvalidHost", "JenkinsConnectionException", "JenkinsUnauthorisedException", "JenkinsRestartFailed",
           "JenkinsActionFailed", "JenkinsGeneralException", "JenkinsWrongAuthenticationMethod",
           "JenkinsAlreadyExists", "JenkinsNotFound", "JenkinsBaseException", "JenkinsEmptyQueue"]


class ExceptionHandler(Exception):
    pass


[docs] class JenkinsBaseException(ExceptionHandler): """ Catch-all Jenkins related exception """
[docs] class JenkinsInvalidHost(JenkinsBaseException): """ Exception raised when the provided host for Jenkins is invalid. """
[docs] class JenkinsConnectionException(JenkinsBaseException): """ Exception raised when there is an issue connecting to Jenkins. """
[docs] class JenkinsUnauthorisedException(JenkinsBaseException): """ Exception raised when the authentication with Jenkins fails. """
[docs] class JenkinsRestartFailed(JenkinsBaseException): """ Exception raised when restarting Jenkins fails. """
[docs] class JenkinsActionFailed(JenkinsBaseException): """ Exception raised when a generic action in Jenkins fails. """
[docs] class JenkinsGeneralException(JenkinsBaseException): """ Exception raised for general errors in Jenkins interactions. """
[docs] class JenkinsWrongAuthenticationMethod(JenkinsBaseException): """ Exception raised when the authentication method used with Jenkins is incorrect. """
[docs] class JenkinsAlreadyExists(JenkinsBaseException): """ Exception raised when attempting to create an object that already exists in Jenkins. """
[docs] class JenkinsNotFound(JenkinsBaseException): """ Exception raised when a resource is not found in Jenkins. """
[docs] class JenkinsEmptyQueue(JenkinsBaseException): """ Exception raised when the job queue is empty in Jenkins. """