
    ?e
                     p    d dl Z d dlZ G d de          Z G d de          Z G d de          Zd ZdS )	    Nc                   (     e Zd ZdZdd fd
Z xZS )UserExceptionz3 An exception capturing user friendly information. Ndetailc                d    t                                                       || _        || _        dS )z_ Initialise the exception with its user friendly text and the
        optional detail.
        N)super__init__textr   )selfr
   r   	__class__s      3lib/python3.11/site-packages/sipbuild/exceptions.pyr	   zUserException.__init__   s-    
 		    __name__
__module____qualname____doc__r	   __classcell__r   s   @r   r   r      sK        =='+           r   r   c                   (     e Zd ZdZdd fd
Z xZS )UserFileExceptionz* An exception related to a specific file. Nr   c                v    t                                          d                    ||          |           dS ) Initialise the exception. {0}: {1}r   N)r   r	   format)r   filenamer
   r   r   s       r   r	   zUserFileException.__init__-   s8     	**8T::6JJJJJr   r   r   s   @r   r   r   *   sV        4415 K K K K K K K K K K Kr   r   c                   (     e Zd ZdZdd fd
Z xZS )UserParseExceptionz9 An exception related to the parsing of a specific file. Nr   c                P    t                                          |d|           dS )r   zunable to parse filer   N)r   r	   )r   r   r   r   s      r   r	   zUserParseException.__init__6   s+     	#9&IIIIIr   r   r   s   @r   r   r   3   sV        CC+/ J J J J J J J J J J Jr   r   c                 $   t          | t                    r| j        !d                    | j        | j                  }n| j        }t          d                    t          j                            t          j
        d                   |          t          j                   t          j        d           t          d                    t          j                            t          j
        d                             t          j                   | )z# Tell the user about an exception. Nr   r   )file   z"{0}: An internal error occurred...)
isinstancer   r   r   r
   printospathbasenamesysargvstderrexit)emessages     r   handle_exceptionr.   <   s     !]## 
8 ''99GGfGj 0 0! = =wGGZ	! 	! 	! 	! 	 
077G$$SXa[113 3   
 Gr   )r%   r(   	Exceptionr   r   r   r.    r   r   <module>r1      s   0 
			 



    I   K K K K K K K KJ J J J J* J J J    r   