
    ,h                     z    d dl 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)    Nc                       e Zd ZdZd Zy)CommandLineErrorzThe traceback of all CommandLineError's is supressed when the
    errors occur on the command line to provide a useful command line
    interface.
    c                     |t        |       z  S Nvars)selfmsgs     U/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/textract/exceptions.pyrenderzCommandLineError.render
   s    T$Z    N)__name__
__module____qualname____doc__r    r   r   r   r      s     r   r   c                       e Zd ZdZd Zd Zy)ExtensionNotSupportedz0This error is raised with unsupported extensionsc                     || _         ddlm} g } |       D ]%  }|j                  d      s|j	                  |       ' dj                  |      | _        y )N   )_get_available_extensions.z, )extparsersr   
startswithappendjoinavailable_extensions_str)r	   r   r   available_extensionses        r   __init__zExtensionNotSupported.__init__   sR    6!*, 	/A||C $++A.	/ )-		2F(G%r   c                 $    | j                  d      S )NzThe filename extension %(ext)s is not yet supported by
textract. Please suggest this filename extension here:

    https://github.com/deanmalmgren/textract/issues

Available extensions include: %(available_extensions_str)s
r   r	   s    r   __str__zExtensionNotSupported.__str__   s    {{K 	r   Nr   r   r   r   r!   r%   r   r   r   r   r      s    :Hr   r   c                       e Zd ZdZd Zd Zy)MissingFileErrorzUThis error is raised when the file can not be located at the
    specified path.
    c                 j    || _         t        j                  j                  |      \  | _        | _        y r   )filenameospathsplitextrootr   )r	   r*   s     r   r!   zMissingFileError.__init__'   s&      gg..x8	48r   c                 $    | j                  d      S )NzdThe file "%(filename)s" can not be found.
Is this the right path/to/file/you/want/to/extract%(ext)s?r#   r$   s    r   r%   zMissingFileError.__str__+   s    {{I 	r   Nr&   r   r   r   r(   r(   #   s    9r   r(   c                       e Zd ZdZd Zd Zy)UnknownMethodzYThis error is raised when the specified --method on the command
    line is unknown.
    c                     || _         y r   )method)r	   r3   s     r   r!   zUnknownMethod.__init__6   s	    r   c                 $    | j                  d      S )Nz;The method "%(method)s" can not be found for this filetype.r#   r$   s    r   r%   zUnknownMethod.__str__9   s    {{I 	r   Nr&   r   r   r   r1   r1   2   s    r   r1   c                   .    e Zd ZdZd Zd Zd Zd Zd Zy)
ShellErrorziThis error is raised when a shell.run returns a non-zero exit code
    (meaning the command failed).
    c                     || _         || _        || _        || _        | j                   j	                         d   | _        y )Nr   )command	exit_codestdoutstderrsplit
executable)r	   r8   r9   r:   r;   s        r   r!   zShellError.__init__C   s7    ",,,,.q1r   c                 J    t         j                  dk(  xr | j                  dk(  S )Nposix   )r+   namer9   r$   s    r   is_not_installedzShellError.is_not_installedJ   s    ww'!;dnn&;;r   c                     dt        |       z  S )NzThe command `%(command)s` failed because the executable
`%(executable)s` is not installed on your system. Please make
sure the appropriate dependencies are installed before using
textract:

    http://textract.readthedocs.org/en/latest/installation.html
r   r$   s    r   not_installed_messagez ShellError.not_installed_messageM   s    P
 J 	r   c                     dt        |       z  S )NzThe command `%(command)s` failed with exit code %(exit_code)d
------------- stdout -------------
%(stdout)s------------- stderr -------------
%(stderr)sr   r$   s    r   failed_messagezShellError.failed_messageV   s    
 J 	r   c                 b    | j                         r| j                         S | j                         S r   )rB   rD   rF   r$   s    r   r%   zShellError.__str___   s,      "--//&&((r   N)	r   r   r   r   r!   rB   rD   rF   r%   r   r   r   r6   r6   ?   s     2<)r   r6   )r+   	Exceptionr   r   r(   r1   r6   r   r   r   <module>rI      sH    	 y  , *' 
$ 
$)! $)r   