
    F                     4   S r SSKJr  SSKJr  SSKJr  SSKJr   " S S\R                  5      r " S S	\R                  5      r	 " S
 S\R                  5      r
 " S S\R                  5      r " S S\R                  5      r " S S\R                  5      rg)zHelpers for raising exceptions.    )absolute_import)division)unicode_literals)
exceptionsc                       \ rS rSrSrSrg)FileOutputError   z.Error thrown for issues with writing to files. N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       6lib/googlecloudsdk/command_lib/privateca/exceptions.pyr   r      s    6r   r   c                       \ rS rSrSrSrg)$InvalidCertificateAuthorityTypeError   z;Error thrown for performing a command on the wrong CA type.r
   Nr   r
   r   r   r   r          Cr   r   c                       \ rS rSrSrSrg)NoUpdateException    zCError thrown when an update command is run resulting in no updates.r
   Nr   r
   r   r   r   r       s    Kr   r   c                       \ rS rSrSrSrg)UserAbortException$   z/Error thrown when an a user aborts the command.r
   Nr   r
   r   r   r   r   $   s    7r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InsufficientPermissionException(   zGIndicates that a user is missing required permissions for an operation.c                 j   > [         [        U ]  SR                  SR	                  U5      U5      5        g)zCreate a new InsufficientPermissionException.

Args:
  resource: str, The resource on which the user needs permissions.
  missing_permissions: iterable, The missing permissions.
zThe current user does not have permissions for this operation. Please ensure you have {} permissions on the {} and that you are logged-in as the correct user and try again.,N)superr   __init__formatjoin)selfresourcemissing_permissions	__class__s      r   r$   (InsufficientPermissionException.__init__+   s4     

)49	??EvHH()8@56r   r
   )r   r   r   r   r   r$   r   __classcell__)r*   s   @r   r   r   (   s    O6 6r   r   c                       \ rS rSrSrSrg)UnsupportedKmsKeyTypeException9   z;Indicates that a user is using an unsupported KMS key type.r
   Nr   r
   r   r   r.   r.   9   r   r   r.   N)r   
__future__r   r   r   googlecloudsdk.corer   Errorr   r   r   r   r   r.   r
   r   r   <module>r3      s    & &  ' *7j&& 7D:+;+; DL
(( L8)) 86j&6&6 6"DZ%5%5 Dr   