
    	h                     V    S r SSKrSSKr " S S\R                  5      rSS jrSS jrg)a  Exception Handling

Exceptions

    To better support COM exceptions, the framework allows for an instance to be
    raised.  This instance may have a certain number of known attributes, which are
    translated into COM exception details.

    This means, for example, that Python could raise a COM exception that includes details
    on a Help file and location, and a description for the user.

    This module provides a class which provides the necessary attributes.
    Nc                   6    \ rS rSrSr       SS jrS rSrg)COMException   a  An Exception object that is understood by the framework.

If the framework is presented with an exception of type class,
it looks for certain known attributes on this class to provide rich
error information to the caller.

It should be noted that the framework supports providing this error
information via COM Exceptions, or via the ISupportErrorInfo interface.

By using this class, you automatically provide rich error information to the
server.
Nc                    U=(       d    UnU(       a  US:w  a  US:  a  US:  a  SUS-  -  nX l         U=(       d    UU l        US:X  a  U R                  (       d  SU l        O3U(       a,  U R                  (       d  [        R                  " U5      U l        X0l        X@l        XPl        [        R                  R                  XU R                  SS5        g)	a  Initialize an exception
**Params**

description -- A string description for the exception.
scode -- An integer scode to be returned to the server, if necessary.
The pythoncom framework defaults this to be DISP_E_EXCEPTION if not specified otherwise.
source -- A string which identifies the source of the error.
helpfile -- A string which points to a help file which contains details on the error.
helpContext -- An integer context in the help file.
desc -- A short-cut for description.
hresult -- A short-cut for scode.
   i i   i  i  S_FALSEN)	scodedescription	pythoncomGetScodeStringsourcehelpfilehelpcontext	com_error__init__)selfr   r
   r   r   helpContextdeschresults           lC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\win32com/server/exception.pyr   COMException.__init__$   s    0  UaZ55=#uz'9:
&.$A:d..(D4++(77>D & 	$$T$2B2BD"M    c                 l    U R                   R                   SU R                  < SU R                  < S3$ )Nz(scode=z, desc=))	__class____name__r
   r   )r   s    r   __repr__COMException.__repr__P   s2    ..))*'$**wtGWGWFZZ[\\r   )r   r   r   r
   r   )NNNNNNN)r   
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s+     *NX]r   r   c                     U c  [         R                  " 5       S   n U [        La  g[        U [        R
                  5      $ Nr   F)sysexc_infotype
issubclassr   r   ts    r   IsCOMExceptionr.   T   s4    yLLN19a,,--r   c                 l    U c  [         R                  " 5       S   n U [        La  g[        U [        5      $ r'   )r(   r)   r*   r+   r   r,   s    r   IsCOMServerExceptionr0   ]   s.    yLLN19a&&r   )N)r#   r(   r   r   r   r.   r0   r%   r   r   <module>r1      s1     
;]9&& ;]|.'r   