Package: org.codehaus.groovy.control

## [Java] Class MultipleCompilationErrorsException

- org.codehaus.groovy.control.MultipleCompilationErrorsException

-     public class MultipleCompilationErrorsException
      extends CompilationFailedException

  Represents multiple other exceptions

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected ErrorCollector` | `collector` | Collector containing the aggregated compilation errors.

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class CompilationFailedException` | `phase, unit`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MultipleCompilationErrorsException(ErrorCollector ec)` Creates an exception that wraps the supplied error collector.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public ErrorCollector` | `getErrorCollector()` Returns the collector containing the recorded compilation errors.
    `` | `public String` | `getMessage()` Formats the aggregated compilation errors as a message string.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CompilationFailedException` | `getUnit`
    `class GroovyRuntimeException` | `getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModule`

- - ### Field Detail

    - #### protected ErrorCollector collector

      Collector containing the aggregated compilation errors.

  - ### Constructor Detail

    - #### public MultipleCompilationErrorsException(ErrorCollector ec)

      Creates an exception that wraps the supplied error collector.

      Parameters:
        `ec` - the collector to wrap, or `null` to create an empty one

  - ### Method Detail

    - #### public ErrorCollector getErrorCollector()

      Returns the collector containing the recorded compilation errors.

      Returns:
        the wrapped error collector

    - #### public String getMessage()

      Formats the aggregated compilation errors as a message string.

      Returns:
        the formatted error message