oi PdZddlZddlZGddejZddZddZdS)aException 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.eZdZdZ ddZdZdS) COMExceptionaAn 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. NcN|p|}|r|dkr|dkr|dkrd|dzz}||_|p||_|dkr|jsd|_n"|r |jstj||_||_||_||_tj|||jdddS) aXInitialize 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. iiiiS_FALSEN) scode description pythoncomGetScodeStringsourcehelpfile helpcontext com_error__init__)selfr r r r helpContextdeschresults IC:\PYTHON\Scheduler\python\Lib\site-packages\win32com/server/exception.pyrzCOMException.__init__$s0   ;UaZZ55==#uz'9: &.$ A::d.:(D    ?4+ ?(7>>D    & $$T5$2BD"MMMMMc@|jjd|jd|jdS)Nz(scode=z, desc=)) __class____name__r r )rs r__repr__zCOMException.__repr__Ps+.)\\$*\\tGW\\\\r)NNNNNNN)r __module__ __qualname____doc__rrrrrrsb   *N*N*N*NX]]]]]rrc|tjd}|turdSt|tjSNrF)sysexc_infotype issubclassr rts rIsCOMExceptionr)Ts8y LNN1  99u a, - --rcx|tjd}|turdSt|tSr")r#r$r%r&rr's rIsCOMServerExceptionr+]s5y LNN1  99u a & &&r)N)rr#r rrr)r+r rrr,s    ;];];];];]9&;];];]|....''''''r