Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy
[Java] Class GroovyBugError

    java.lang.Object
      java.lang.Throwable
          java.lang.Error
              java.lang.AssertionError
                  org.codehaus.groovy.GroovyBugError

    public class GroovyBugError
    extends java.lang.AssertionError

This class represents an error that is thrown when a bug is recognized inside the runtime. Basically it is thrown when a constraint is not fullfilled that should be fullfiled.

Authors:
  Jochen Theodorou

Constructor Summary
`GroovyBugError(java.lang.String message)` constructs a bug error using the given text
`GroovyBugError(java.lang.Exception exception)` Constructs a bug error using the given exception
`GroovyBugError(java.lang.String msg, java.lang.Exception exception)` Constructs a bug error using the given exception and a text with additional information about the cause

Method Summary
`java.lang.String` | `getBugText()` Returns the bug text to describe this error
`java.lang.Throwable` | `getCause()`
`java.lang.String` | `getMessage()` Returns the detail message string of this error.
`void` | `setBugText(java.lang.String msg)` Sets the bug text to describe this error
`java.lang.String` | `toString()` Returns a String representation of this class by calling `getMessage()`.

Methods inherited from class java.lang.AssertionError
java.lang.AssertionError#printStackTrace(), java.lang.AssertionError#printStackTrace(java.io.PrintStream), java.lang.AssertionError#printStackTrace(java.io.PrintWriter), java.lang.AssertionError#fillInStackTrace(), java.lang.AssertionError#getCause(), java.lang.AssertionError#initCause(java.lang.Throwable), java.lang.AssertionError#toString(), java.lang.AssertionError#getMessage(), java.lang.AssertionError#getLocalizedMessage(), java.lang.AssertionError#getStackTrace(), java.lang.AssertionError#setStackTrace([Ljava.lang.StackTraceElement;), java.lang.AssertionError#addSuppressed(java.lang.Throwable), java.lang.AssertionError#getSuppressed(), java.lang.AssertionError#wait(long), java.lang.AssertionError#wait(long, int), java.lang.AssertionError#wait(), java.lang.AssertionError#equals(java.lang.Object), java.lang.AssertionError#hashCode(), java.lang.AssertionError#getClass(), java.lang.AssertionError#notify(), java.lang.AssertionError#notifyAll()

Methods inherited from class java.lang.Error
java.lang.Error#printStackTrace(), java.lang.Error#printStackTrace(java.io.PrintStream), java.lang.Error#printStackTrace(java.io.PrintWriter), java.lang.Error#fillInStackTrace(), java.lang.Error#getCause(), java.lang.Error#initCause(java.lang.Throwable), java.lang.Error#toString(), java.lang.Error#getMessage(), java.lang.Error#getLocalizedMessage(), java.lang.Error#getStackTrace(), java.lang.Error#setStackTrace([Ljava.lang.StackTraceElement;), java.lang.Error#addSuppressed(java.lang.Throwable), java.lang.Error#getSuppressed(), java.lang.Error#wait(long), java.lang.Error#wait(long, int), java.lang.Error#wait(), java.lang.Error#equals(java.lang.Object), java.lang.Error#hashCode(), java.lang.Error#getClass(), java.lang.Error#notify(), java.lang.Error#notifyAll()

Constructor Detail

### GroovyBugError

    public GroovyBugError(java.lang.String message)

  constructs a bug error using the given text
  Parameters:
    `message` - the error message text

### GroovyBugError

    public GroovyBugError(java.lang.Exception exception)

  Constructs a bug error using the given exception
  Parameters:
    `exception` - cause of this error

### GroovyBugError

    public GroovyBugError(java.lang.String msg, java.lang.Exception exception)

  Constructs a bug error using the given exception and a text with additional information about the cause
  Parameters:
    `msg` - additional information about this error
    `exception` - cause of this error

Method Detail

### getBugText

    public java.lang.String getBugText()

  Returns the bug text to describe this error

### getCause

    public java.lang.Throwable getCause()

### getMessage

    public java.lang.String getMessage()

  Returns the detail message string of this error. The message will consist of the bug text prefixed by "BUG! " if there this instance was created using a message. If this error was constructed without using a bug text the message of the cause is used prefixed by "BUG! UNCAUGHT EXCEPTION: "
  Returns:
    the detail message string of this error.

### setBugText

    public void setBugText(java.lang.String msg)

  Sets the bug text to describe this error

### toString

    public java.lang.String toString()

  Returns a String representation of this class by calling `getMessage()`.
  See Also:
    getMessage()

Groovy Documentation