Skip to content

Commit e70aa54

Browse files
committed
add COMError exception to Doc/library/ctypes.rst.
1 parent 2313f84 commit e70aa54

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Doc/library/ctypes.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,24 @@ different ways, depending on the type and number of the parameters in the call:
18031803
the COM interface as first argument, in addition to those parameters that
18041804
are specified in the :attr:`!argtypes` tuple.
18051805

1806+
1807+
.. exception:: COMError(hresult, text, details)
1808+
1809+
Windows only: This non-public exception is raised when a COM method call
1810+
fails.
1811+
1812+
.. attribute:: hresult
1813+
1814+
The integer value representing the error code.
1815+
1816+
.. attribute:: text
1817+
1818+
A string containing the error message or ``None``.
1819+
1820+
.. attribute:: details
1821+
1822+
A tuple of length 5 representing additional details about the error.
1823+
18061824
The optional *paramflags* parameter creates foreign function wrappers with much
18071825
more functionality than the features described above.
18081826

0 commit comments

Comments
 (0)