
                             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j                        Z G d
 de
      Z G d dej                        Z G d de
      Zy)z?Version-agnostic errors to raise for gcloud functions commands.    )absolute_import)division)unicode_literals)
exceptionsc                       e Zd ZdZy)FunctionsErrorz5Base exception for user recoverable Functions errors.N__name__
__module____qualname____doc__     6lib/googlecloudsdk/command_lib/functions/exceptions.pyr   r      s    =r   r   c                   "     e Zd ZdZ fdZ xZS )SourceArgumentErrorz<Exception for errors related to using the --source argument.c                 .    t         t        |   d|       y )Nz--source)superr   __init__selfmessage	__class__s     r   r   zSourceArgumentError.__init__   s    	
t-j'Br   r
   r   r   r   r   __classcell__r   s   @r   r   r      s    DC Cr   r   c                   "     e Zd ZdZ fdZ xZS )OversizedDeploymentErrorz0Exception to indicate the deployment is too big.c                 L    t         t        |   dj                  ||             y )NzFUncompressed deployment is {}, bigger than maximum allowed size of {}.)r   r   r   format)r   actual_sizemax_allowed_sizer   s      r   r   z!OversizedDeploymentError.__init__&   s#    	
"D2P	-	.r   r   r   s   @r   r   r   #   s    8 r   r   c                   "     e Zd ZdZ fdZ xZS )IgnoreFileNotFoundErrorz@Exception for when file specified by --ignore-file is not found.c                 .    t         t        |   d|       y )Nz--ignore-file)r   r$   r   r   s     r   r   z IgnoreFileNotFoundError.__init__0   s    	
!41/7Kr   r   r   s   @r   r$   r$   -   s    HL Lr   r$   c                       e Zd ZdZy)SourceUploadErrorz%Exception for source upload failures.Nr	   r   r   r   r'   r'   4   s    -r   r'   N)r   
__future__r   r   r   googlecloudsdk.callioper   calliope_exceptionsgooglecloudsdk.coreErrorr   InvalidArgumentExceptionr   r   r$   r'   r   r   r   <module>r.      sn    F &  ' E *>Z%% >C-FF C~ L1JJ L. .r   