[pywin32-bugs] [ pywin32-Bugs-1022681 ] SetScrollInfo masks errors from ParseSCROLLINFOTuple
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-09-05 18:24:46
|
Bugs item #1022681, was opened at 2004-09-05 10:24 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=1022681&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Greg Chapman (glchapman) Assigned to: Nobody/Anonymous (nobody) Summary: SetScrollInfo masks errors from ParseSCROLLINFOTuple Initial Comment: Using Python 2.3.4 and win32all build 202: >>> import win32gui >>> win32gui.SetScrollInfo(0, 0, ()) Traceback (most recent call last): File "<stdin>", line 1, in ? pywintypes.error: (0, 'SetScrollInfo', 'No error message is available') Looking at ParseSCROLLINFOTuple, it looks to me that all of the paths with return FALSE also make sure a python exception is set (which in the above case would be the much more helpful "SCROLLINFO tuple has invalid size"). However, PySetScrollInfo calls PyWin_SetAPIError when ParseSCROLLINFOTuple returns false, thereby replacing the exception with the unhelpful one in the above traceback. So I'd suggest changing PySetScrollinfo's call to ParseSCROLLINFOTuple to: if (ParseSCROLLINFOTuple(obInfo, &info) == 0) return NULL; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1022681&group_id=78018 |