com.io7m.smfj.parser.api

## Class SMFParseErrors

- java.lang.Object
- - com.io7m.smfj.parser.api.SMFParseErrors

-     public final class SMFParseErrors
      extends Object

  Convenient functions for constructing parse errors.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFParseError` | `errorException(Exception e)` Construct a parse error for the given exception.
    `static SMFParseError` | `errorExpectedGot(String message, String expected, String received, com.io7m.jlexing.core.LexicalPosition<URI> position)` Construct a parse error that indicates the expected and actual input.
    `static SMFParseError` | `errorExpectedGotWithException(String message, String expected, String received, com.io7m.jlexing.core.LexicalPosition<URI> position, Exception exception)` Construct a parse error that indicates the expected and actual input.
    `static SMFParseError` | `errorWithMessage(String message)` Construct a parse error for the given exception.

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

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

- - ### Method Detail

    - #### errorException

          public static SMFParseError errorException(Exception e)

      Construct a parse error for the given exception.
      Parameters:
        `e` - The exception
      Returns:
        A parse error

    - #### errorWithMessage

          public static SMFParseError errorWithMessage(String message)

      Construct a parse error for the given exception.
      Parameters:
        `message` - The error message
      Returns:
        A parse error

    - #### errorExpectedGot

          public static SMFParseError errorExpectedGot(String message,
                                                       String expected,
                                                       String received,
                                                       com.io7m.jlexing.core.LexicalPosition<URI> position)

      Construct a parse error that indicates the expected and actual input.
      Parameters:
        `message` - An error message
        `expected` - The expected input
        `received` - The received input
        `position` - The current position
      Returns:
        A parse error

    - #### errorExpectedGotWithException

          public static SMFParseError errorExpectedGotWithException(String message,
                                                                    String expected,
                                                                    String received,
                                                                    com.io7m.jlexing.core.LexicalPosition<URI> position,
                                                                    Exception exception)

      Construct a parse error that indicates the expected and actual input.
      Parameters:
        `message` - An error message
        `expected` - The expected input
        `received` - The received input
        `position` - The current position
        `exception` - An exception raised during parsing
      Returns:
        A parse error

Copyright © 2017 <code@io7m.com> http://io7m.com