virtual_knitting_machine.knitting_machine_exceptions.Knitting_Machine_Error module
Module containing the base class for knitting machine exceptions. This module provides the foundational exception class that all knitting machine-specific exceptions inherit from, standardizing error message formatting and handling behavior across the virtual knitting machine system for critical error states.
- exception Knitting_Machine_Error(message, violation=Violation.Machine_State_Violation)[source]
Bases:
ExceptionSuperclass for all exceptions that would put the virtual knitting machine in an error state. This class provides standardized exception message formatting and serves as the base for all machine-specific exceptions that indicate critical operational failures requiring immediate attention and program termination.
- __init__(message, violation=Violation.Machine_State_Violation)[source]
Initialize a knitting machine exception with formatted message.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.