Package mars.simulator
Class SimulatorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
mars.simulator.SimulatorException
- All Implemented Interfaces:
- Serializable
Class to represent error that occurs while assembling or running a MIPS program.
- Version:
- August 2003
- Author:
- Pete Sanderson
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor for ProcessingException.SimulatorException(int exitCode) Constructor for ProcessingException.SimulatorException(String message) Constructor for ProcessingException.SimulatorException(BasicStatement statement, String message) Constructor for ProcessingException to handle runtime exceptionsSimulatorException(BasicStatement statement, String message, int cause) Constructor for ProcessingException to handle runtime exceptionsSimulatorException(BasicStatement statement, AddressErrorException exception) Constructor for ProcessingException to handle address runtime exceptionsSimulatorException(AddressErrorException exception) Constructor for ProcessingException.
- 
Method SummaryModifier and TypeMethodDescriptionProduce the error code passed by the program.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
SimulatorExceptionConstructor for ProcessingException.- Parameters:
- message-
 
- 
SimulatorExceptionConstructor for ProcessingException.- Parameters:
- exception- AddressErrorException object containing specialized error message, cause, address
 
- 
SimulatorExceptionConstructor for ProcessingException to handle runtime exceptions- Parameters:
- statement- BasicStatement of statement causing runtime exception
- message- String containing specialized error message
 
- 
SimulatorExceptionConstructor for ProcessingException to handle runtime exceptions- Parameters:
- statement- BasicStatement of statement causing runtime exception
- message- String containing specialized error message
- cause- exception cause (see Exceptions class for list)
 
- 
SimulatorExceptionConstructor for ProcessingException to handle address runtime exceptions- Parameters:
- statement- a BasicStatement of statement causing runtime exception
- exception- AddressErrorException object containing specialized error message, cause, address
 
- 
SimulatorExceptionpublic SimulatorException(int exitCode) Constructor for ProcessingException.No error list, but allows passing of exit code (i.e., syscall 17 for exiting with exit code). - Parameters:
- exitCode- exit code
 
- 
SimulatorExceptionpublic SimulatorException()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- 
getExitCodeProduce the error code passed by the program.- Returns:
- Returns the error code.
 
 
-