Package mars
Class ErrorList
java.lang.Object
mars.ErrorList
Maintains list of generated error messages, regardless of source (tokenizing,
parsing, assembly, execution).
- Version:
- August 2003
- Author:
- Pete Sanderson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add(ErrorMessage mess)
Add new error message to end of list.void
add(ErrorMessage mess, int index)
Add new error message at specified index position.int
Count of number of error messages in list.boolean
Check to see if error limit has been exceeded.boolean
Determine whether error has occurred or not.Produce report containing both warnings and errors, warnings first.Produce error report.Produce warning report.int
Get limit on number of error messages to be generated by one assemble operation.Get ArrayList of error messages.int
Count of number of warning messages in list.boolean
Determine whether warning has occurred or not.
-
Field Details
-
ERROR_MESSAGE_PREFIX
- See Also:
- Constant Field Values
-
WARNING_MESSAGE_PREFIX
- See Also:
- Constant Field Values
-
FILENAME_PREFIX
- See Also:
- Constant Field Values
-
LINE_PREFIX
- See Also:
- Constant Field Values
-
POSITION_PREFIX
- See Also:
- Constant Field Values
-
MESSAGE_SEPARATOR
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ErrorList
public ErrorList()Constructor for ErrorList
-
-
Method Details
-
getErrorMessages
Get ArrayList of error messages.- Returns:
- ArrayList of ErrorMessage objects
-
errorsOccurred
public boolean errorsOccurred()Determine whether error has occurred or not.- Returns:
true
if an error has occurred (does not include warnings),false
otherwise.
-
warningsOccurred
public boolean warningsOccurred()Determine whether warning has occurred or not.- Returns:
true
if an warning has occurred,false
otherwise.
-
add
Add new error message to end of list.- Parameters:
mess
- ErrorMessage object to be added to end of error list.
-
add
Add new error message at specified index position.- Parameters:
mess
- ErrorMessage object to be added to end of error list.index
- position in error list
-
errorCount
public int errorCount()Count of number of error messages in list.- Returns:
- Number of error messages in list.
-
warningCount
public int warningCount()Count of number of warning messages in list.- Returns:
- Number of warning messages in list.
-
errorLimitExceeded
public boolean errorLimitExceeded()Check to see if error limit has been exceeded.- Returns:
- True if error limit exceeded, false otherwise.
-
getErrorLimit
public int getErrorLimit()Get limit on number of error messages to be generated by one assemble operation.- Returns:
- error limit.
-
generateErrorReport
Produce error report.- Returns:
- String containing report.
-
generateWarningReport
Produce warning report.- Returns:
- String containing report.
-
generateErrorAndWarningReport
Produce report containing both warnings and errors, warnings first.- Returns:
- String containing report.
-