Package mars

Class ProcessingException

All Implemented Interfaces:
Serializable

public class ProcessingException extends Exception
Class to represent an error that occurs while assembling or running a MIPS program.
Version:
August 2003
Author:
Pete Sanderson
See Also:
Serialized Form
  • Constructor Details

    • ProcessingException

      public ProcessingException(ErrorList e)
      Constructor for ProcessingException.
      Parameters:
      e - An ErrorList which is an ArrayList of ErrorMessage objects. Each ErrorMessage represents one processing error.
    • ProcessingException

      public ProcessingException(ErrorList e, AddressErrorException aee)
      Constructor for ProcessingException.
      Parameters:
      e - An ErrorList which is an ArrayList of ErrorMessage objects. Each ErrorMessage represents one processing error.
      aee - AddressErrorException object containing specialized error message, cause, address
    • ProcessingException

      public ProcessingException(ProgramStatement ps, String m)
      Constructor for ProcessingException to handle runtime exceptions
      Parameters:
      ps - a ProgramStatement of statement causing runtime exception
      m - a String containing specialized error message
    • ProcessingException

      public ProcessingException(ProgramStatement ps, String m, int cause)
      Constructor for ProcessingException to handle runtime exceptions
      Parameters:
      ps - a ProgramStatement of statement causing runtime exception
      m - a String containing specialized error message
      cause - exception cause (see Exceptions class for list)
    • ProcessingException

      public ProcessingException(ProgramStatement ps, AddressErrorException aee)
      Constructor for ProcessingException to handle address runtime exceptions
      Parameters:
      ps - a ProgramStatement of statement causing runtime exception
      aee - AddressErrorException object containing specialized error message, cause, address
    • ProcessingException

      public ProcessingException()
      Constructor for ProcessingException. No parameter and thus no error list. Use this for normal MIPS program termination (e.g. syscall 10 for exit).
  • Method Details

    • errors

      public ErrorList errors()
      Produce the list of error messages.
      Returns:
      Returns ErrorList of error messages.
      See Also:
      ErrorList, ErrorMessage