|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmars.ErrorMessage
public class ErrorMessage
Represents occurrance of an error detected during tokenizing, assembly or simulation.
| Field Summary | |
|---|---|
static boolean |
ERROR
Constant to indicate this message is error not warning |
static boolean |
WARNING
Constant to indicate this message is warning not error |
| Constructor Summary | |
|---|---|
ErrorMessage(boolean isWarning,
MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
Constructor for ErrorMessage. |
|
ErrorMessage(boolean isWarning,
String filename,
int line,
int position,
String message,
String macroExpansionHistory)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information. |
|
ErrorMessage(MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
Constructor for ErrorMessage. |
|
ErrorMessage(ProgramStatement statement,
String message)
Constructor for ErrorMessage, to be used for runtime exceptions. |
|
ErrorMessage(String filename,
int line,
int position,
String message)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information. |
|
ErrorMessage(String filename,
int line,
int position,
String message,
String macroExpansionHistory)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information. |
|
| Method Summary | |
|---|---|
String |
getFilename()
Produce name of file containing error. |
int |
getLine()
Produce line number of error. |
String |
getMacroExpansionHistory()
Returns string describing macro expansion. |
String |
getMessage()
Produce error message. |
int |
getPosition()
Produce position within erroneous line. |
boolean |
isWarning()
Determine whether this message represents error or warning. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean WARNING
public static final boolean ERROR
| Constructor Detail |
|---|
@Deprecated
public ErrorMessage(String filename,
int line,
int position,
String message)
filename - String containing name of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.
@Deprecated
public ErrorMessage(String filename,
int line,
int position,
String message,
String macroExpansionHistory)
filename - String containing name of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.macroExpansionHistory -
@Deprecated
public ErrorMessage(boolean isWarning,
String filename,
int line,
int position,
String message,
String macroExpansionHistory)
isWarning - set to WARNING if message is a warning not error, else set to ERROR or omit.filename - String containing name of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.macroExpansionHistory - provided so message for macro can include both definition and usage line numbers
public ErrorMessage(MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
sourceMIPSprogram - MIPSprogram object of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.
public ErrorMessage(boolean isWarning,
MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
isWarning - set to WARNING if message is a warning not error, else set to ERROR or omit.sourceMIPSprogram - MIPSprogram object of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.
public ErrorMessage(ProgramStatement statement,
String message)
statement - The ProgramStatement object for the instruction causing the runtime errormessage - String containing appropriate error message.| Method Detail |
|---|
public String getFilename()
public int getLine()
public int getPosition()
public String getMessage()
public boolean isWarning()
public String getMacroExpansionHistory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||