[pywin32-checkins] /hgroot/pywin32/pywin32: 2 new changesets
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2015-04-13 14:45:32
|
changeset c13cc925af27 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=c13cc925af27 summary: Use exception attributes in axscript error handling (patch #141) changeset 4e527a8f8266 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=4e527a8f8266 summary: Don't encode message passed to OutputDebugString (patch #142) diffstat: com/win32comext/axscript/client/error.py | 6 +++--- com/win32comext/axscript/client/framework.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diffs (41 lines): diff -r 36371c35cf59 -r 4e527a8f8266 com/win32comext/axscript/client/error.py --- a/com/win32comext/axscript/client/error.py Fri Apr 10 07:00:52 2015 -0400 +++ b/com/win32comext/axscript/client/error.py Mon Apr 13 10:43:40 2015 -0400 @@ -157,9 +157,9 @@ bits = ['Traceback (most recent call last):\n'] bits.extend(traceback.format_list(format_items)) if exc_type==pythoncom.com_error: - desc = "%s (0x%x)" % (value[1], value[0]) - if value[0]==winerror.DISP_E_EXCEPTION and value[2] and value[2][2]: - desc = value[2][2] + desc = "%s (0x%x)" % (value.strerror, value.hresult) + if value.hresult==winerror.DISP_E_EXCEPTION and value.excepinfo and value.excepinfo[2]: + desc = value.excepinfo[2] bits.append("COM Error: "+desc) else: bits.extend(traceback.format_exception_only(exc_type, value)) diff -r 36371c35cf59 -r 4e527a8f8266 com/win32comext/axscript/client/framework.py --- a/com/win32comext/axscript/client/framework.py Fri Apr 10 07:00:52 2015 -0400 +++ b/com/win32comext/axscript/client/framework.py Mon Apr 13 10:43:40 2015 -0400 @@ -61,7 +61,7 @@ try: self.redir.write(message) except: - win32api.OutputDebugString(message.encode('mbcs')) + win32api.OutputDebugString(message) def flush(self): pass def close(self): @@ -941,10 +941,10 @@ exc_traceback = None raise # It could be an error by another script. - if issubclass(pythoncom.com_error, exc_type) and exc_value[0]==axscript.SCRIPT_E_REPORTED: + if issubclass(pythoncom.com_error, exc_type) and exc_value.hresult==axscript.SCRIPT_E_REPORTED: # Ensure the traceback doesnt cause a cycle. exc_traceback = None - raise Exception(scode=exc_value[0]) + raise Exception(scode=exc_value.hresult) exception = error.AXScriptException(self, \ codeBlock, exc_type, exc_value, exc_traceback) |