file ¶
Classes:
-
FileIsADirectoryError–Raised when you try to access a file but it's a directory instead
-
FileNotExistsError–Raised when a file doesn't exists
-
FilePermissionError–Raised when you try to access a file but haven't got permissions to do so
-
FileTypeMismatchError–Raised when you try to access a file with a FileType != AUTO and it's another file type
-
FileWasNotFoundError–Raised when a file wasn't found but the path is correct, e.g. parent directory exists
-
PathIsNotADirectoryError–Raised when you try to access a directory but it's not a directory
FileIsADirectoryError ¶
FileIsADirectoryError(
message: SupportsString | None = None,
func: FuncExcept | None = None,
reason: Any = None,
**kwargs: Any
)
Bases: CustomError, IsADirectoryError
Raised when you try to access a file but it's a directory instead
Instantiate a new exception with pretty printing and more.
Parameters:
-
(message¶SupportsString | None, default:None) –Message of the error.
-
(func¶FuncExcept | None, default:None) –Function this exception was raised from.
-
(reason¶Any, default:None) –Reason of the exception. For example, an optional parameter.
Methods:
-
__call__–Copy an existing exception with defaults and instantiate a new one.
-
catch–Create a context manager that catches exceptions of this class type.
Attributes:
Source code in jetpytools/exceptions/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__call__ ¶
__call__(
message: SupportsString | None | MissingT = MISSING,
func: FuncExcept | None | MissingT = MISSING,
reason: SupportsString | FuncExcept | None | MissingT = MISSING,
**kwargs: Any
) -> Self
Copy an existing exception with defaults and instantiate a new one.
Parameters:
-
(message¶SupportsString | None | MissingT, default:MISSING) –Message of the error.
-
(func¶FuncExcept | None | MissingT, default:MISSING) –Function this exception was raised from.
-
(reason¶SupportsString | FuncExcept | None | MissingT, default:MISSING) –Reason of the exception. For example, an optional parameter.
Source code in jetpytools/exceptions/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
catch classmethod ¶
catch() -> CatchError[Self]
Create a context manager that catches exceptions of this class type.
Returns:
-
CatchError[Self]–CatchError[Self]: A context manager that will catch and store exceptions of type
clswhen used in awithblock.
Source code in jetpytools/exceptions/base.py
134 135 136 137 138 139 140 141 142 143 | |
FileNotExistsError ¶
FileNotExistsError(
message: SupportsString | None = None,
func: FuncExcept | None = None,
reason: Any = None,
**kwargs: Any
)
Bases: CustomError, FileExistsError
Raised when a file doesn't exists
Instantiate a new exception with pretty printing and more.
Parameters:
-
(message¶SupportsString | None, default:None) –Message of the error.
-
(func¶FuncExcept | None, default:None) –Function this exception was raised from.
-
(reason¶Any, default:None) –Reason of the exception. For example, an optional parameter.
Methods:
-
__call__–Copy an existing exception with defaults and instantiate a new one.
-
catch–Create a context manager that catches exceptions of this class type.
Attributes:
Source code in jetpytools/exceptions/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__call__ ¶
__call__(
message: SupportsString | None | MissingT = MISSING,
func: FuncExcept | None | MissingT = MISSING,
reason: SupportsString | FuncExcept | None | MissingT = MISSING,
**kwargs: Any
) -> Self
Copy an existing exception with defaults and instantiate a new one.
Parameters:
-
(message¶SupportsString | None | MissingT, default:MISSING) –Message of the error.
-
(func¶FuncExcept | None | MissingT, default:MISSING) –Function this exception was raised from.
-
(reason¶SupportsString | FuncExcept | None | MissingT, default:MISSING) –Reason of the exception. For example, an optional parameter.
Source code in jetpytools/exceptions/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
catch classmethod ¶
catch() -> CatchError[Self]
Create a context manager that catches exceptions of this class type.
Returns:
-
CatchError[Self]–CatchError[Self]: A context manager that will catch and store exceptions of type
clswhen used in awithblock.
Source code in jetpytools/exceptions/base.py
134 135 136 137 138 139 140 141 142 143 | |
FilePermissionError ¶
FilePermissionError(
message: SupportsString | None = None,
func: FuncExcept | None = None,
reason: Any = None,
**kwargs: Any
)
Bases: CustomPermissionError
Raised when you try to access a file but haven't got permissions to do so
Instantiate a new exception with pretty printing and more.
Parameters:
-
(message¶SupportsString | None, default:None) –Message of the error.
-
(func¶FuncExcept | None, default:None) –Function this exception was raised from.
-
(reason¶Any, default:None) –Reason of the exception. For example, an optional parameter.
Methods:
-
__call__–Copy an existing exception with defaults and instantiate a new one.
-
catch–Create a context manager that catches exceptions of this class type.
Attributes:
Source code in jetpytools/exceptions/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__call__ ¶
__call__(
message: SupportsString | None | MissingT = MISSING,
func: FuncExcept | None | MissingT = MISSING,
reason: SupportsString | FuncExcept | None | MissingT = MISSING,
**kwargs: Any
) -> Self
Copy an existing exception with defaults and instantiate a new one.
Parameters:
-
(message¶SupportsString | None | MissingT, default:MISSING) –Message of the error.
-
(func¶FuncExcept | None | MissingT, default:MISSING) –Function this exception was raised from.
-
(reason¶SupportsString | FuncExcept | None | MissingT, default:MISSING) –Reason of the exception. For example, an optional parameter.
Source code in jetpytools/exceptions/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
catch classmethod ¶
catch() -> CatchError[Self]
Create a context manager that catches exceptions of this class type.
Returns:
-
CatchError[Self]–CatchError[Self]: A context manager that will catch and store exceptions of type
clswhen used in awithblock.
Source code in jetpytools/exceptions/base.py
134 135 136 137 138 139 140 141 142 143 | |
FileTypeMismatchError ¶
FileTypeMismatchError(
message: SupportsString | None = None,
func: FuncExcept | None = None,
reason: Any = None,
**kwargs: Any
)
Bases: CustomError, OSError
Raised when you try to access a file with a FileType != AUTO and it's another file type
Instantiate a new exception with pretty printing and more.
Parameters:
-
(message¶SupportsString | None, default:None) –Message of the error.
-
(func¶FuncExcept | None, default:None) –Function this exception was raised from.
-
(reason¶Any, default:None) –Reason of the exception. For example, an optional parameter.
Methods:
-
__call__–Copy an existing exception with defaults and instantiate a new one.
-
catch–Create a context manager that catches exceptions of this class type.
Attributes:
Source code in jetpytools/exceptions/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__call__ ¶
__call__(
message: SupportsString | None | MissingT = MISSING,
func: FuncExcept | None | MissingT = MISSING,
reason: SupportsString | FuncExcept | None | MissingT = MISSING,
**kwargs: Any
) -> Self
Copy an existing exception with defaults and instantiate a new one.
Parameters:
-
(message¶SupportsString | None | MissingT, default:MISSING) –Message of the error.
-
(func¶FuncExcept | None | MissingT, default:MISSING) –Function this exception was raised from.
-
(reason¶SupportsString | FuncExcept | None | MissingT, default:MISSING) –Reason of the exception. For example, an optional parameter.
Source code in jetpytools/exceptions/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
catch classmethod ¶
catch() -> CatchError[Self]
Create a context manager that catches exceptions of this class type.
Returns:
-
CatchError[Self]–CatchError[Self]: A context manager that will catch and store exceptions of type
clswhen used in awithblock.
Source code in jetpytools/exceptions/base.py
134 135 136 137 138 139 140 141 142 143 | |
FileWasNotFoundError ¶
FileWasNotFoundError(
message: SupportsString | None = None,
func: FuncExcept | None = None,
reason: Any = None,
**kwargs: Any
)
Bases: CustomError, FileNotFoundError
Raised when a file wasn't found but the path is correct, e.g. parent directory exists
Instantiate a new exception with pretty printing and more.
Parameters:
-
(message¶SupportsString | None, default:None) –Message of the error.
-
(func¶FuncExcept | None, default:None) –Function this exception was raised from.
-
(reason¶Any, default:None) –Reason of the exception. For example, an optional parameter.
Methods:
-
__call__–Copy an existing exception with defaults and instantiate a new one.
-
catch–Create a context manager that catches exceptions of this class type.
Attributes:
Source code in jetpytools/exceptions/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__call__ ¶
__call__(
message: SupportsString | None | MissingT = MISSING,
func: FuncExcept | None | MissingT = MISSING,
reason: SupportsString | FuncExcept | None | MissingT = MISSING,
**kwargs: Any
) -> Self
Copy an existing exception with defaults and instantiate a new one.
Parameters:
-
(message¶SupportsString | None | MissingT, default:MISSING) –Message of the error.
-
(func¶FuncExcept | None | MissingT, default:MISSING) –Function this exception was raised from.
-
(reason¶SupportsString | FuncExcept | None | MissingT, default:MISSING) –Reason of the exception. For example, an optional parameter.
Source code in jetpytools/exceptions/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
catch classmethod ¶
catch() -> CatchError[Self]
Create a context manager that catches exceptions of this class type.
Returns:
-
CatchError[Self]–CatchError[Self]: A context manager that will catch and store exceptions of type
clswhen used in awithblock.
Source code in jetpytools/exceptions/base.py
134 135 136 137 138 139 140 141 142 143 | |
PathIsNotADirectoryError ¶
PathIsNotADirectoryError(
message: SupportsString | None = None,
func: FuncExcept | None = None,
reason: Any = None,
**kwargs: Any
)
Bases: CustomError, NotADirectoryError
Raised when you try to access a directory but it's not a directory
Instantiate a new exception with pretty printing and more.
Parameters:
-
(message¶SupportsString | None, default:None) –Message of the error.
-
(func¶FuncExcept | None, default:None) –Function this exception was raised from.
-
(reason¶Any, default:None) –Reason of the exception. For example, an optional parameter.
Methods:
-
__call__–Copy an existing exception with defaults and instantiate a new one.
-
catch–Create a context manager that catches exceptions of this class type.
Attributes:
Source code in jetpytools/exceptions/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__call__ ¶
__call__(
message: SupportsString | None | MissingT = MISSING,
func: FuncExcept | None | MissingT = MISSING,
reason: SupportsString | FuncExcept | None | MissingT = MISSING,
**kwargs: Any
) -> Self
Copy an existing exception with defaults and instantiate a new one.
Parameters:
-
(message¶SupportsString | None | MissingT, default:MISSING) –Message of the error.
-
(func¶FuncExcept | None | MissingT, default:MISSING) –Function this exception was raised from.
-
(reason¶SupportsString | FuncExcept | None | MissingT, default:MISSING) –Reason of the exception. For example, an optional parameter.
Source code in jetpytools/exceptions/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
catch classmethod ¶
catch() -> CatchError[Self]
Create a context manager that catches exceptions of this class type.
Returns:
-
CatchError[Self]–CatchError[Self]: A context manager that will catch and store exceptions of type
clswhen used in awithblock.
Source code in jetpytools/exceptions/base.py
134 135 136 137 138 139 140 141 142 143 | |