Coverage for structured_tutorials / errors.py: 100%
12 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-02 21:10 +0200
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-02 21:10 +0200
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 RunTutorialException(StructuredTutorialError):
12 """Exception that is raised when we capture an exception while running (and not yet cleaning up)."""
15class InvalidAlternativesSelectedError(StructuredTutorialError):
16 """Exception raised when an invalid alternative is selected."""
19class ConfigurationException(RunTutorialException):
20 """Exception raised when a configuration error occurs."""
23class RequiredExecutableNotFoundError(ConfigurationException):
24 """Exception raised when a required executable is not found."""
27class PartError(StructuredTutorialError):
28 """Base class for all errors happening in a specific part."""
31class CommandsPartError(PartError):
32 """Base class for all errors happening in a specific commands part."""
35class CommandTestError(CommandsPartError):
36 """Base class for exceptions when a test for a command fails."""
39class CommandOutputTestError(CommandTestError):
40 """Exception raised when an output test fails."""
43class FilePartError(PartError):
44 """Exception raised for errors in file parts."""
47class DestinationIsADirectoryError(FilePartError):
48 """Exception raised when a destination is a directory."""
51class PromptNotConfirmedError(PartError):
52 """Exception raised when a user does not confirm the current state in a prompt part."""