Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mars
Class ErrorList

    java.lang.Object
      mars.ErrorList

    public class ErrorList

extends Object

Maintains list of generated error messages, regardless of source (tokenizing, parsing, assembly, execution).

Author:
  Pete Sanderson

Field Summary
`static String` | `ERROR_MESSAGE_PREFIX`
`static String` | `FILENAME_PREFIX`
`static String` | `LINE_PREFIX`
`static String` | `MESSAGE_SEPARATOR`
`static String` | `POSITION_PREFIX`
`static String` | `WARNING_MESSAGE_PREFIX`

Constructor Summary
`ErrorList()` Constructor for ErrorList

Method Summary
`void` | `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` | `errorCount()` Count of number of error messages in list.
`boolean` | `errorLimitExceeded()` Check to see if error limit has been exceeded.
`boolean` | `errorsOccurred()` Determine whether error has occured or not.
`String` | `generateErrorAndWarningReport()` Produce report containing both warnings and errors, warnings first.
`String` | `generateErrorReport()` Produce error report.
`String` | `generateWarningReport()` Produce warning report.
`int` | `getErrorLimit()` Get limit on number of error messages to be generated by one assemble operation.
`ArrayList` | `getErrorMessages()` Get ArrayList of error messages.
`int` | `warningCount()` Count of number of warning messages in list.
`boolean` | `warningsOccurred()` Determine whether warning has occured or not.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ERROR_MESSAGE_PREFIX

    public static final String ERROR_MESSAGE_PREFIX

See Also:
  Constant Field Values

### WARNING_MESSAGE_PREFIX

    public static final String WARNING_MESSAGE_PREFIX

See Also:
  Constant Field Values

### FILENAME_PREFIX

    public static final String FILENAME_PREFIX

See Also:
  Constant Field Values

### LINE_PREFIX

    public static final String LINE_PREFIX

See Also:
  Constant Field Values

### POSITION_PREFIX

    public static final String POSITION_PREFIX

See Also:
  Constant Field Values

### MESSAGE_SEPARATOR

    public static final String MESSAGE_SEPARATOR

See Also:
  Constant Field Values

Constructor Detail

### ErrorList

    public ErrorList()

  Constructor for ErrorList

Method Detail

### getErrorMessages

    public ArrayList getErrorMessages()

  Get ArrayList of error messages.

  Returns:
    ArrayList of ErrorMessage objects

### errorsOccurred

    public boolean errorsOccurred()

  Determine whether error has occured or not.

  Returns:
    `true` if an error has occurred (does not include warnings), `false` otherwise.

### warningsOccurred

    public boolean warningsOccurred()

  Determine whether warning has occured or not.

  Returns:
    `true` if an warning has occurred, `false` otherwise.

### add

    public void add(ErrorMessage mess)

  Add new error message to end of list.

  Parameters:
    `mess` - ErrorMessage object to be added to end of error list.

### add

    public void add(ErrorMessage mess,
                    int index)

  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

    public String generateErrorReport()

  Produce error report.

  Returns:
    String containing report.

### generateWarningReport

    public String generateWarningReport()

  Produce warning report.

  Returns:
    String containing report.

### generateErrorAndWarningReport

    public String generateErrorAndWarningReport()

  Produce report containing both warnings and errors, warnings first.

  Returns:
    String containing report.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD