Package: org.codehaus.groovy.control.messages

## [Java] Class SyntaxErrorMessage

- org.codehaus.groovy.control.messages.SyntaxErrorMessage

-     public class SyntaxErrorMessage
      extends Message

  A class for error messages produced by the parser system.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected SyntaxException` | `cause` | Underlying syntax exception.
    `protected SourceUnit` | `source` | Source unit containing the syntax error.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SyntaxErrorMessage(SyntaxException cause, SourceUnit source)` Creates a message for the supplied syntax error.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public SyntaxException` | `getCause()` Returns the underlying SyntaxException.
    `` | `public void` | `write(PrintWriter output, Janitor janitor)` Writes out a nicely formatted summary of the syntax error.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Message` | `create, create, create, write, write`

- - ### Field Detail

    - #### protected SyntaxException cause

      Underlying syntax exception.

    - #### protected SourceUnit source

      Source unit containing the syntax error.

  - ### Constructor Detail

    - #### public SyntaxErrorMessage(SyntaxException cause, SourceUnit source)

      Creates a message for the supplied syntax error.

      Parameters:
        `cause` - the syntax exception to report
        `source` - the source unit containing the error

  - ### Method Detail

    - #### public SyntaxException getCause()

      Returns the underlying SyntaxException.

    - #### public void write(PrintWriter output, Janitor janitor)

      Writes out a nicely formatted summary of the syntax error.