
                            d 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 G d de      Z G d de      Z G d de      Z G d de      Zy)zExceptions for concept args.    )absolute_import)division)unicode_literals)
exceptionsc                       e Zd ZdZy)Errorz%Base class for errors in this module.N__name__
__module____qualname____doc__     5lib/googlecloudsdk/command_lib/concepts/exceptions.pyr   r      s    -r   r   c                   "     e Zd ZdZ fdZ xZS )ConstraintErrorz#Error when converting a constraint.c                 P    t         t        |   dj                  ||||             y )NzInvalid {} [{}] for [{}]. {})superr   __init__format)selfconcept_namekindstringmessage	__class__s        r   r   zConstraintError.__init__   s)    	/4)&--&,	12r   r
   r   r   r   r   __classcell__r   s   @r   r   r      s    +2 2r   r   c                   "     e Zd ZdZ fdZ xZS )
ParseErrorzError when parsing a concept.c                 L    t         t        |   dj                  ||             y )NzFailed to parse [{}]. {})r   r!   r   r   r   r   r   r   s      r   r   zParseError.__init__(   s#    	*d$")),@Br   r   r   s   @r   r!   r!   %   s    %B Br   r!   c                   "     e Zd ZdZ fdZ xZS )ValidationErrorz Error when validating a concept.c                 L    t         t        |   dj                  ||             y )NzFailed to validate [{}]. {})r   r%   r   r   r#   s      r   r   zValidationError.__init__0   s#    	/4)%,,\7CEr   r   r   s   @r   r%   r%   -   s    (E Er   r%   c                       e Zd ZdZy)InitializationErrorz;Error when a concept was initialized with an invalid value.Nr	   r   r   r   r(   r(   5   s    Cr   r(   c                   "     e Zd ZdZ fdZ xZS )MissingRequiredArgumentErrorz-Error when a required concept can't be found.c                 L    t         t        |   dj                  ||             y )Nz"No value was provided for [{}]: {})r   r*   r   r   r#   s      r   r   z%MissingRequiredArgumentError.__init__<   s$    	
&6,33L'JLr   r   r   s   @r   r*   r*   9   s    5L Lr   r*   c                   "     e Zd ZdZ fdZ xZS )ModalGroupErrorz5Error when a modal group was not specified correctly.c                 P    t         t        |   dj                  |||             y )NzAFailed to specify [{}]: {specified}: {missing} must be specified.)	specifiedmissing)r   r-   r   r   )r   r   r/   r0   r   s       r   r   zModalGroupError.__init__D   s(    	/4)	4		7	CEr   r   r   s   @r   r-   r-   A   s    =E Er   r-   c                   "     e Zd ZdZ fdZ xZS )OptionalMutexGroupErrorz?Error when an optional mutex group was not specified correctly.c                 N    t         t        |   dj                  ||             y )NzCFailed to specify [{}]: At most one of {conflict} can be specified.conflict)r   r2   r   r   r   r   r5   r   s      r   r   z OptionalMutexGroupError.__init__N   s$    	
!41M	x	02r   r   r   s   @r   r2   r2   K   s    G2 2r   r2   c                   "     e Zd ZdZ fdZ xZS )RequiredMutexGroupErrorz>Error when a required mutex group was not specified correctly.c                 N    t         t        |   dj                  ||             y )NzDFailed to specify [{}]: Exactly one of {conflict} must be specified.r4   )r   r8   r   r   r6   s      r   r   z RequiredMutexGroupError.__init__W   s$    	
!41N	x	02r   r   r   s   @r   r8   r8   T   s    F2 2r   r8   N)r   
__future__r   r   r   googlecloudsdk.corer   r   r   r!   r%   r(   r*   r-   r2   r8   r   r   r   <module>r<      s    # &  ' *.J .2e 2B BEe ED% DL5 LEe E2e 22e 2r   