mars.mips.hardware
Class AddressErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
mars.mips.hardware.AddressErrorException
- All Implemented Interfaces:
- Serializable
public class AddressErrorException
- extends Exception
Represents MIPS AddressErrorException. This is generated by the assembler when the
source code references a memory address not valid for the context.
- Author:
- Pete Sanderson
- See Also:
- Serialized Form
Method Summary |
int |
getAddress()
Get the erroneous memory address. |
int |
getType()
Get the exception type (load or store). |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
AddressErrorException
public AddressErrorException(String message,
int exceptType,
int addr)
- Constructor for the AddressErrorException class
- Parameters:
addr
- The erroneous memory address.
getAddress
public int getAddress()
- Get the erroneous memory address.
- Returns:
- The erroneous memory address.
getType
public int getType()
- Get the exception type (load or store).
- Returns:
- Exception type: Exceptions.ADDRESS_EXCEPTION_LOAD, Exceptions.ADDRESS_EXCEPTION_STORE