
                             d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ  G d dej                        Z G d	 d
e      Z	 G d de      Z
 G d de      Z G d de      Zy)z>Custom errors for the SCC RemediationIntent resource commands.    )absolute_import)division)print_function)unicode_literals)
exceptionsc                       e Zd ZdZy)Errorz!Base error class for this module.N)__name__
__module____qualname____doc__     @lib/googlecloudsdk/command_lib/scc/remediation_intents/errors.pyr	   r	      s    )r   r	   c                   (     e Zd ZdZdef fdZ xZS )TfStateFetchingErrorz2An error occurred while fetching the TfState data.error_messagec                 ^    |t         t        |   d       yt         t        |   d|        y)z}Initializes the TfStateFetchingError.

    Args:
      error_message: The error message to be included in the exception.
    Nz1An error occurred while fetching the TfState dataz3An error occurred while fetching the TfState data: superr	   __init__)selfr   	__class__s     r   r   zTfStateFetchingError.__init__    s8     E4!
= E4!?
Or   r
   r   r   r   strr   __classcell__r   s   @r   r   r      s    :C  r   r   c                   ,     e Zd ZdZdedef fdZ xZS )APICallErrorz:An error occurred while calling the RemediationIntent API.method_namer   c                 h    ||t         t        |   d       yt         t        |   d| d|        y)zInitializes the APICallError.

    Args:
      method_name: The name of the API method that failed.
      error_message: The error message to be included in the exception.
    Nz;An Internal service error occurred while calling the methodz<An Internal service error occurred while calling the method z, detailed error: r   )r   r    r   r   s      r   r   zAPICallError.__init__3   sI      3E4!
G E4!],]O=r   r   r   s   @r   r   r   0   s    B# c  r   r   c                   *     e Zd ZdZddef fdZ xZS )InvalidGitConfigErrorz;An error representing missing field in the git config file.missing_fieldc                 `    |t         t        |   d       yt         t        |   d| d       y)zInitializes the InvalidGitConfigError.

    Args:
      missing_field: The name of the missing field in the git config file.
    NzMissing git config field name.z(Field missing from the git config file: .r   )r   r$   r   s     r   r   zInvalidGitConfigError.__init__H   s6     E4!"BCE4!4]O1
Er   )Nr   r   s   @r   r#   r#   E   s    CC  r   r#   c                   ,     e Zd ZdZdedef fdZ xZS )InvalidDirectoryPathErrorz9An error representing an invalid relative directory path.dir_pathr   c                 T    |t         |   d       yt         |   d| d|        y)zInitializes the InvalidDirectoryPathError.

    Args:
      dir_path: The invalid relative directory path.
      error_message: The error message to be included in the exception.
    Nz Invalid relative directory path.z!Invalid relative directory path: z. Detailed error: )r   r   )r   r)   r   r   s      r   r   z"InvalidDirectoryPathError.__init__Y   s<     g9:g-hZ 8_r   r   r   s   @r   r(   r(   V   s    As 3  r   r(   N)r   
__future__r   r   r   r   googlecloudsdk.corer   r	   r   r   r#   r(   r   r   r   <module>r-      s\    E &  % ' **J *5 &5 *E " r   