public class GroovyException
extends Exception
implements GroovyExceptionInterface
Base exception class for Groovy compiler errors and warnings. Implements GroovyExceptionInterface to track exception severity.
| Constructor and description |
|---|
GroovyException()Constructs a GroovyException with no detail message or cause. |
GroovyException(String message)Constructs a GroovyException with the specified detail message. |
GroovyException(String message, Throwable cause)Constructs a GroovyException with the specified detail message and cause. |
GroovyException(boolean fatal)Constructs a GroovyException with the specified fatality flag. |
GroovyException(String message, boolean fatal)Constructs a GroovyException with the specified detail message and fatality flag. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
isFatal()Returns whether this exception is fatal. A fatal exception typically causes compilation to stop.
|
|
public void |
setFatal(boolean fatal)Sets whether this exception is fatal. A fatal exception typically causes compilation to stop.
|
| Methods inherited from class | Name |
|---|---|
class Exception |
addSuppressed, equals, fillInStackTrace, getCause, getClass, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, hashCode, initCause, notify, notifyAll, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, wait, wait, wait |
Constructs a GroovyException with no detail message or cause.
Constructs a GroovyException with the specified detail message.
message - the detail message describing this exception Constructs a GroovyException with the specified detail message and cause.
message - the detail message describing this exceptioncause - the underlying cause of this exception Constructs a GroovyException with the specified fatality flag.
fatal - true if this exception should halt compilation; false otherwise Constructs a GroovyException with the specified detail message and fatality flag.
message - the detail message describing this exceptionfatal - true if this exception should halt compilation; false otherwiseReturns whether this exception is fatal. A fatal exception typically causes compilation to stop.
true if this exception is fatal; false otherwiseSets whether this exception is fatal. A fatal exception typically causes compilation to stop.
fatal - true to mark this exception as fatal; false otherwiseCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.