Errors

This module contains all error definitions.

InputFileSyntaxError

class cs143sim.errors.InputFileSyntaxError(line_number, message)[source]

InputFileSyntaxError is an Exception thrown when an unrecognized syntax is used in the input file.

Parameters:
  • line_number (int) – erroneous line of input file
  • message (str) – error message

InputFileUnknownReference

class cs143sim.errors.InputFileUnknownReference(line_number, message)[source]

InputFileUnknownReference is an Exception thrown when a link or host makes reference to an unknown object (Host/Router/Link)

Parameters:
  • line_number (int) – erroneous line of input file
  • message (str) – error message

MissingAttribute

class cs143sim.errors.MissingAttribute(obj_type, obj_id, missing_attr)[source]

MissingAttribute is an Exception designed to notify the user that the input file is missing information

Parameters:
  • obj_type
  • obj_id
  • missing_attr