summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libposix.tex
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-07-23 19:50:09 (GMT)
committerBarry Warsaw <barry@python.org>1998-07-23 19:50:09 (GMT)
commiteef2cd14c92d37aadc31ec283882d03204c3f5c6 (patch)
treef3e344affb3dd6ab45f28f43b0644aa140ab3282 /Doc/lib/libposix.tex
parent27467e4b7e6897fcd0e639680abe3728ee846245 (diff)
downloadcpython-eef2cd14c92d37aadc31ec283882d03204c3f5c6.zip
cpython-eef2cd14c92d37aadc31ec283882d03204c3f5c6.tar.gz
cpython-eef2cd14c92d37aadc31ec283882d03204c3f5c6.tar.bz2
Updated the description of os.error to reflect the fact that it is now
equivalent to exceptions.OSError.
Diffstat (limited to 'Doc/lib/libposix.tex')
-rw-r--r--Doc/lib/libposix.tex17
1 files changed, 11 insertions, 6 deletions
diff --git a/Doc/lib/libposix.tex b/Doc/lib/libposix.tex
index b7d49b9..dbfc692 100644
--- a/Doc/lib/libposix.tex
+++ b/Doc/lib/libposix.tex
@@ -25,9 +25,11 @@ The descriptions below are very terse; refer to the corresponding
\UNIX{} manual (or \POSIX{} documentation) entry for more information.
Arguments called \var{path} refer to a pathname given as a string.
-Errors are reported as exceptions; the usual exceptions are given
-for type errors, while errors reported by the system calls raise
-\exception{error}, described below.
+Errors are reported as exceptions; the usual exceptions are given for
+type errors, while errors reported by the system calls raise
+\exception{error} (a synonym for the standard exception
+\exception{OSError}), described
+below.
Module \module{posix} defines the following data items:
@@ -66,11 +68,14 @@ error codes defined by the underlying operating system.
When exceptions are classes, this exception carries two attributes,
\member{errno} and \member{strerror}. The first holds the value of
the \C{} \cdata{errno} variable, and the latter holds the
-corresponding error message from \cfunction{strerror()}.
+corresponding error message from \cfunction{strerror()}. For
+exceptions that involve a file system path (e.g. \code{chdir} or
+\code{unlink}), the exception instance will contain a third attribute
+\member{filename} which is the file name passed to the
+function.
When exceptions are strings, the string for the exception is
-\code{'os.error'}; this reflects the more portable access to the
-exception through the \module{os} module.
+\code{'OSError'}.
\end{excdesc}
It defines the following functions and constants: