Coverage for structured_tutorials / errors.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-21 19:08 +0100
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-21 19:08 +0100
1# Copyright (c) 2025 Mathias Ertl
2# Licensed under the MIT License. See LICENSE file for details.
4"""Collection of errors thrown by this project."""
7class StructuredTutorialError(Exception):
8 """Base class for all exceptions thrown by this project."""
11class InvalidAlternativesSelectedError(StructuredTutorialError):
12 """Exception raised when an invalid alternative is selected."""
15class PartError(StructuredTutorialError):
16 """Base class for all errors happening in a specific part."""
19class CommandsPartError(PartError):
20 """Base class for all errors happening in a specific commands part."""
23class CommandTestError(CommandsPartError):
24 """Base class for exceptions when a test for a command fails."""
27class CommandOutputTestError(CommandTestError):
28 """Exception raised when an output test fails."""
31class FilePartError(PartError):
32 """Exception raised for errors in file parts."""
35class DestinationIsADirectoryError(FilePartError):
36 """Exception raised when a destination is a directory."""
39class PromptNotConfirmedError(PartError):
40 """Exception raised when a user does not confirm the current state in a prompt part."""