Coverage for structured_tutorials / errors.py: 100%
10 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-22 14:45 +0100
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-22 14:45 +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 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 PartError(StructuredTutorialError):
20 """Base class for all errors happening in a specific part."""
23class CommandsPartError(PartError):
24 """Base class for all errors happening in a specific commands part."""
27class CommandTestError(CommandsPartError):
28 """Base class for exceptions when a test for a command fails."""
31class CommandOutputTestError(CommandTestError):
32 """Exception raised when an output test fails."""
35class FilePartError(PartError):
36 """Exception raised for errors in file parts."""
39class DestinationIsADirectoryError(FilePartError):
40 """Exception raised when a destination is a directory."""
43class PromptNotConfirmedError(PartError):
44 """Exception raised when a user does not confirm the current state in a prompt part."""