summaryrefslogtreecommitdiff
path: root/fs/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'fs/errors.py')
-rw-r--r--fs/errors.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/errors.py b/fs/errors.py
index 04da17f..eea21d0 100644
--- a/fs/errors.py
+++ b/fs/errors.py
@@ -11,6 +11,7 @@ catch-all exception.
__all__ = ['FSError',
'CreateFailedError',
'PathError',
+ 'InvalidCharsInPathError',
'OperationFailedError',
'UnsupportedError',
'RemoteConnectionError',
@@ -32,7 +33,7 @@ __all__ = ['FSError',
'NoMMapError',
'BackReferenceError',
'convert_fs_errors',
- 'convert_os_errors'
+ 'convert_os_errors',
]
import sys
@@ -42,10 +43,6 @@ from fs.path import *
from fs.local_functools import wraps
-class InvalidPathError(Exception):
- pass
-
-
class FSError(Exception):
"""Base exception class for the FS module."""
default_message = "Unspecified error"
@@ -71,7 +68,6 @@ class FSError(Exception):
return (self.__class__,(),self.__dict__.copy(),)
-
class CreateFailedError(FSError):
"""An exception thrown when a FS could not be created"""
default_message = "Unable to create filesystem"
@@ -87,6 +83,10 @@ class PathError(FSError):
super(PathError,self).__init__(**kwds)
+class InvalidCharsInPathError(PathError):
+ default_message = "Path contains invalid characters: %(path)s"
+
+
class OperationFailedError(FSError):
"""Base exception class for errors associated with a specific operation."""
default_message = "Unable to %(opname)s: unspecified error [%(errno)s - %(details)s]"