Package icyllis.arc3d.compiler

# Class ErrorHandler

java.lang.Object
icyllis.arc3d.compiler.ErrorHandler

public abstract class ErrorHandler extends Object
Class which is notified in the event of an error.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected int`
  `mLength`
  `protected int`
  `mOffset`
  `protected char[]`
  `mSource`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ErrorHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `error(int start, int end, String msg)`
  Reports an error.
  `final void`
  `error(int pos, String msg)`
  Reports an error.
  `final int`
  `errorCount()`
  `final char[]`
  `getSource()`
  `final int`
  `getSourceLength()`
  `final int`
  `getSourceOffset()`
  `protected abstract void`
  `handleError(int start, int end, String msg)`
  Called when an error is reported.
  `protected abstract void`
  `handleWarning(int start, int end, String msg)`
  Called when a warning is reported.
  `final void`
  `reset()`
  `final void`
  `setSource(char[] source, int offset, int length)`
  `final void`
  `warning(int start, int end, String msg)`
  Reports a warning.
  `final void`
  `warning(int pos, String msg)`
  Reports a warning.
  `final int`
  `warningCount()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### mSource

    protected char[] mSource

  - ### mOffset

    protected int mOffset

  - ### mLength

    protected int mLength

- ## Constructor Details

  - ### ErrorHandler

    public ErrorHandler()

- ## Method Details

  - ### getSource

    public final char[] getSource()

  - ### getSourceOffset

    public final int getSourceOffset()

  - ### getSourceLength

    public final int getSourceLength()

  - ### setSource

    public final void setSource(char[] source, int offset, int length)

  - ### errorCount

    public final int errorCount()

  - ### warningCount

    public final int warningCount()

  - ### reset

    public final void reset()

  - ### error

    public final void error(int pos, String msg)
    Reports an error.
    Parameters:
      `pos` - see `Position`
      `msg` - the error message to report

  - ### error

    public final void error(int start, int end, String msg)
    Reports an error.
    Parameters:
      `start` - the start offset in the source string, or -1
      `end` - the end offset in the source string, or -1
      `msg` - the error message to report

  - ### warning

    public final void warning(int pos, String msg)
    Reports a warning.
    Parameters:
      `pos` - see `Position`
      `msg` - the warning message to report

  - ### warning

    public final void warning(int start, int end, String msg)
    Reports a warning.
    Parameters:
      `start` - the start offset in the source string, or -1
      `end` - the end offset in the source string, or -1
      `msg` - the warning message to report

  - ### handleError

    protected abstract void handleError(int start, int end, String msg)
    Called when an error is reported.

  - ### handleWarning

    protected abstract void handleWarning(int start, int end, String msg)
    Called when a warning is reported.