knitout_interpreter.knitout_warnings.Knitout_Warning module

Collection of warnings related to knitout processing

exception Knitout_Warning(message, ignore_instructions=False)[source]

Bases: RuntimeWarning

Base class for warnings related to knitout operations that can be handled gracefully. This class provides standardized warning message formatting and supports configurable instruction ignoring behavior for different types of machine state issues.

__init__(message, ignore_instructions=False)[source]

Initialize a knitting machine warning with formatted message.

Parameters:
  • message (str) – The descriptive warning message about the machine state issue.

  • ignore_instructions (bool, optional) – Whether this warning indicates that the operation should be ignored. Defaults to False.

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.

exception Reorder_Carriage_Pass_Warning(carriage_pass)[source]

Bases: Knitout_Warning

Warning raised when risky attempt to reorder a carriage pass.

__init__(carriage_pass)[source]

Initialize a knitting machine warning with formatted message.

Parameters:
  • message (str) – The descriptive warning message about the machine state issue.

  • ignore_instructions (bool, optional) – Whether this warning indicates that the operation should be ignored. Defaults to False.

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.

exception Knitout_BreakPoint_Condition_Warning(exception)[source]

Bases: Knitout_Warning

Warning raised when a knitout debugger ignores a conditional breakpoint where the condition caused an exception

__init__(exception)[source]

Initialize a knitting machine warning with formatted message.

Parameters:
  • message (str) – The descriptive warning message about the machine state issue.

  • ignore_instructions (bool, optional) – Whether this warning indicates that the operation should be ignored. Defaults to False.

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.

exception Missed_Snapshot_Warning(target_line, current_line)[source]

Bases: Knitout_Warning

Warning raised when knit execution is set with a target line that may have already passed.

__init__(target_line, current_line)[source]

Initialize a knitting machine warning with formatted message.

Parameters:
  • message (str) – The descriptive warning message about the machine state issue.

  • ignore_instructions (bool, optional) – Whether this warning indicates that the operation should be ignored. Defaults to False.

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.