
    ~                         S r SSKJr   " S S\R                  5      r " S S\R                  5      r " S S\R                  5      rSS
 jrg	)z>Wrapper for user-visible error exceptions to raise in the CLI.    )
exceptionsc                       \ rS rSrSrSrg)FunctionsError   z Exceptions for Functions errors. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       5lib/googlecloudsdk/api_lib/functions/v2/exceptions.pyr   r      s    (r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InvalidArgumentException   z4InvalidArgumentException is for malformed arguments.c                 V   > [         [        U ]  SR                  X5      5        Xl        g)zCreates InvalidArgumentException.

Args:
  parameter_name: str, the parameter flag or argument name
  message: str, the exception message
zInvalid value for [{0}]: {1}N)superr   __init__formatparameter_nameselfr   message	__class__s      r   r   !InvalidArgumentException.__init__   s+     

"D2&--nF )r   r   r   r	   r
   r   r   r   r   __classcell__r   s   @r   r   r      s    <
) 
)r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )RequiredArgumentException)   zKAn exception for when a usually optional argument is required in this case.c                 V   > [         [        U ]  SR                  X5      5        Xl        g )Nz$Missing required argument [{0}]: {1})r   r"   r   r   r   r   s      r   r   "RequiredArgumentException.__init__,   s)    	
#T3.55nN )r   r   r   r    s   @r   r"   r"   )   s    S) )r   r"   Nc                 P    U(       a  [        U5      $ [        U R                  5      $ )zHConvert a google.rpc.Status (used for LRO errors) into a FunctionsError.)r   r   )statuserror_messages     r   StatusToFunctionsErrorr)   3   s    -((		''r   )N)r   googlecloudsdk.corer   Errorr   r   r"   r)   r   r   r   <module>r,      sK    E +)Z%% ))z// ) )
 0 0 )(r   