FileSystemError is gone

This commit is contained in:
Antoine Pitrou 2011-08-30 18:13:41 +02:00
parent dd705440cb
commit 3ceecd9e7e
1 changed files with 5 additions and 12 deletions

View File

@ -396,14 +396,11 @@ the list of errnos mapped to them, is submitted to discussion:
as a generic timeout exception, replacing ``socket.timeout`` and also useful
for other types of timeout (for example in Lock.acquire())
In addition, the following exception class are proposed for inclusion:
In addition, the following exception class is proposed for inclusion:
* ``ConnectionError``: a base class for ``ConnectionAbortedError``,
``ConnectionRefusedError`` and ``ConnectionResetError``
* ``FileSystemError``: a base class for ``FileExistsError``,
``FileNotFoundError``, ``IsADirectoryError`` and ``NotADirectoryError``
The following drawing tries to sum up the proposed additions, along with
the corresponding errno values (where applicable). The root of the
sub-hierarchy (OSError, assuming `Step 1`_ is accepted in full) is not
@ -415,12 +412,11 @@ shown::
+-- ConnectionAbortedError ECONNABORTED
+-- ConnectionRefusedError ECONNREFUSED
+-- ConnectionResetError ECONNRESET
+-- FileSystemError
+-- FileExistsError EEXIST
+-- FileNotFoundError ENOENT
+-- IsADirectoryError EISDIR
+-- NotADirectoryError ENOTDIR
+-- FileExistsError EEXIST
+-- FileNotFoundError ENOENT
+-- InterruptedError EINTR
+-- IsADirectoryError EISDIR
+-- NotADirectoryError ENOTDIR
+-- PermissionError EACCES, EPERM
+-- TimeoutError ETIMEDOUT
@ -432,9 +428,6 @@ exception class names should end in "``Error``". In favour is consistency
with the rest of the exception hiearchy, against is concision (especially
with long names such as ``ConnectionAbortedError``).
Another cosmetic issue is whether ``FileSystemError`` should be spelled
``FilesystemError`` instead.
Exception attributes
--------------------