mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Change WindowsError to carry the Win32 error code in winerror,
and the DOS error code in errno. Revert changes where WindowsError catch blocks unnecessarily special-case OSError.
This commit is contained in:
parent
38e3b7d2d3
commit
879768dd97
8 changed files with 234 additions and 37 deletions
|
@ -399,11 +399,15 @@ Raised when an \keyword{assert} statement fails.
|
|||
\begin{excdesc}{WindowsError}
|
||||
Raised when a Windows-specific error occurs or when the error number
|
||||
does not correspond to an \cdata{errno} value. The
|
||||
\member{errno} and \member{strerror} values are created from the
|
||||
\member{winerror} and \member{strerror} values are created from the
|
||||
return values of the \cfunction{GetLastError()} and
|
||||
\cfunction{FormatMessage()} functions from the Windows Platform API.
|
||||
The \member{errno} value maps the \member{winerror} value to
|
||||
corresponding \code{errno.h} values.
|
||||
This is a subclass of \exception{OSError}.
|
||||
\versionadded{2.0}
|
||||
\versionchanged[Previous versions put the \cfunction{GetLastError()}
|
||||
codes into \member{errno}]{2.5}
|
||||
\end{excdesc}
|
||||
|
||||
\begin{excdesc}{ZeroDivisionError}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue