Skip to content

Exceptions module

Provide custom exceptions for the game.

This module allows the raise of custom exceptions.

The module contains the following custom exceptions: - InvalidGameState - InvalidMove - UnknownGameScore

InvalidGameState

Bases: Exception

Raised when the game state is invalid.

Source code in src\backend\logic\exceptions.py
11
12
class InvalidGameState(Exception):
    """Raised when the game state is invalid."""

InvalidMove

Bases: Exception

Raised when the move is invalid.

Source code in src\backend\logic\exceptions.py
14
15
class InvalidMove(Exception):
    """Raised when the move is invalid."""

UnknownGameScore

Bases: Exception

Raised when the game score is unknown.

Source code in src\backend\logic\exceptions.py
17
18
class UnknownGameScore(Exception):
    """Raised when the game score is unknown."""