[pywin32-bugs] [ pywin32-Bugs-986673 ] Python exceptions through COM custom interface
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-07-07 15:54:54
|
Bugs item #986673, was opened at 2004-07-07 15:54 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=986673&group_id=78018 Category: com Group: None Status: Open Resolution: None Priority: 5 Submitted By: Phil Rittenhouse (prittenh) Assigned to: Nobody/Anonymous (nobody) Summary: Python exceptions through COM custom interface Initial Comment: The problem occurs with Python COM servers raising COM exceptions across a custom interface. Using the dispatch interface works fine, but in the custom interface the exception's error information is lost. The problem appears to be in PyGatewayBase::InterfaceSupportsErrorInfo() in PyGatewayBase.cpp. It is called to determine whether the GetErrorInfo API should be used to extract an error after an error HRESULT is returned from an interface. The function is passed an IID of an interface, the code compares this to the return value of GetIID() which is always IID_IUnknown. The comparison fails, so the function returns S_FALSE and no error info is extracted. The comment above the definition of GetIID() says: // Currently this is used only for ISupportErrorInfo, // so hopefully this will never be called in this base class. // (however, this is not a rule, so we wont assert or anything!) But it appears that it is called in the base class (or at least not overloaded by anyone inheriting from it). Everything seems to work fine if you just change InterfaceSupportsErrorInfo() to always return S_OK. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=986673&group_id=78018 |