knitout_interpreter.knitout_errors.Knitout_Error module
Exceptions related to processing knitout
- exception Knitout_Error(message)[source]
Bases:
ExceptionAn super type for exceptions related to execution a knitout program.
- __init__(message)[source]
Initialize a knitout exception with formatted message.
- Parameters:
message (str) – The descriptive error message about knitout error
- 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_ParseError(line_number, knitout_line, parse_error)[source]
Bases:
Knitout_ErrorRaised from a knitout file with a parsing error
- __init__(line_number, knitout_line, parse_error)[source]
Initialize a knitout exception with formatted message.
- Parameters:
message (str) – The descriptive error message about knitout error
- 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 Incomplete_Knitout_Line_Error(line_number, knitout_line)[source]
Bases:
Knitout_ErrorRaised from a knitout file when parsing an incomplete knitout line
- __init__(line_number, knitout_line)[source]
Initialize a knitout exception with formatted message.
- Parameters:
message (str) – The descriptive error message about knitout error
- 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_Machine_StateError(knitout_line, error, line_number=None)[source]
Bases:
Knitout_ErrorRaised when executing a line of knitout caused an error
- __init__(knitout_line, error, line_number=None)[source]
- Parameters:
knitout_line (Knitout_Line) – The knitout line being executed that caused the error.
error (Exception) – An exception raised during the execution of a knitout program.
line_number (int, optional) – The line number of the instruction. Defaults to the original line number of the given knitout line.
- 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.