Package org.codehaus.groovy.control

# Class MultipleCompilationErrorsException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.lang.GroovyRuntimeException
org.codehaus.groovy.control.CompilationFailedException
org.codehaus.groovy.control.MultipleCompilationErrorsException

All Implemented Interfaces:
  `Serializable`

public class MultipleCompilationErrorsException extends CompilationFailedException
Represents multiple other exceptions

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ErrorCollector`
  `collector`
  Collector containing the aggregated compilation errors.

  ### Fields inherited from class org.codehaus.groovy.control.CompilationFailedException

  `phase, unit`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ErrorCollector`
  `getErrorCollector()`
  Returns the collector containing the recorded compilation errors.
  `String`
  `getMessage()`
  Formats the aggregated compilation errors as a message string.

  ### Methods inherited from class org.codehaus.groovy.control.CompilationFailedException

  `getUnit`

  ### Methods inherited from class groovy.lang.GroovyRuntimeException

  `getLocationText, getMessageWithoutLocationText, getModule, getNode, setModule`

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

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- ## Field Details

  - ### collector

    protected ErrorCollector collector
    Collector containing the aggregated compilation errors.

- ## Constructor Details

  - ### MultipleCompilationErrorsException

    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 Details

  - ### getErrorCollector

    public ErrorCollector getErrorCollector()
    Returns the collector containing the recorded compilation errors.
    Returns:
      the wrapped error collector

  - ### getMessage

    public String getMessage()
    Formats the aggregated compilation errors as a message string.
    Overrides:
      `getMessage` in class `GroovyRuntimeException`
    Returns:
      the formatted error message