
    	                     4   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j                        Z	 G d
 dej                        Z
 G d dej                        Z G d dej                        Z G d dej                        Zy)z"Exceptions for the cloudbuild API.    )absolute_import)division)unicode_literals)
exceptionsc                   "     e Zd ZdZ fdZ xZS )ParserErrorz%Error parsing YAML into a dictionary.c                 R    dj                  ||      }t        t        |   |       y )Nzparsing {path}: {msg})pathmsg)formatsuperr   __init__)selfr
   r   	__class__s      >lib/googlecloudsdk/api_lib/cloudbuild/cloudbuild_exceptions.pyr   zParserError.__init__   s/    
!
(
( ) C 
+t%c*    __name__
__module____qualname____doc__r   __classcell__r   s   @r   r   r      s    -+ +r   r   c                   "     e Zd ZdZ fdZ xZS )ParseProtoExceptionz<Error interpreting a dictionary as a specific proto message.c                 T    dj                  |||      }t        t        |   |       y )Nz*interpreting {path} as {proto_name}: {msg})r
   
proto_namer   )r   r   r   r   )r   r
   r   r   r   s       r   r   zParseProtoException.__init__&   s3    
6
=
= > C
 

t-c2r   r   r   s   @r   r   r   #   s    D3 3r   r   c                   "     e Zd ZdZ fdZ xZS )HybridNonAlphaConfigErrorzGHybrid Configs are currently only supported in the alpha release track.c                 0    d}t         t        |   |       y )Nzinvalid config file.)r   r   r   r   r   r   s     r   r   z"HybridNonAlphaConfigError.__init__2   s    
 C	
#T3C8r   r   r   s   @r   r   r   /   s    O9 9r   r   c                   "     e Zd ZdZ fdZ xZS ) WorkerConfigButNoWorkerpoolErrorzVThe user has not supplied a worker pool even though a workerconfig has been specified.c                 0    d}t         t        |   |       y )NzODetected a worker pool config but no worker pool. Please specify a worker pool.)r   r#   r   r!   s     r   r   z)WorkerConfigButNoWorkerpoolError.__init__:   s    C	
*D:3?r   r   r   s   @r   r#   r#   7   s    ^@ @r   r#   c                   "     e Zd ZdZ fdZ xZS )TektonVersionErrorz2The Tekton version user supplied is not supported.c                 0    d}t         t        |   |       y )NzTTekton version is not supported. Only tekton.dev/v1beta1 is supported at the moment.)r   r&   r   r!   s     r   r   zTektonVersionError.__init__C   s    &C	
d,S1r   r   r   s   @r   r&   r&   @   s    :2 2r   r&   c                   "     e Zd ZdZ fdZ xZS )InvalidYamlErrorz)The Tekton Yaml user supplied is invalid.c                 P    dj                  |      }t        t        |   |       y )NzInvalid yaml: {msg})r   )r   r   r)   r   r!   s     r   r   zInvalidYamlError.__init__L   s&     
(
(S
(
1C	
D*3/r   r   r   s   @r   r)   r)   I   s    10 0r   r)   N)r   
__future__r   r   r   googlecloudsdk.corer   Errorr   r   r   r#   r&   r)    r   r   <module>r/      s    ) &  ' *+*"" +	3*** 	39
 0 0 9@z'7'7 @2)) 20z'' 0r   