[Java] Class GroovyBugError
- org.codehaus.groovy.GroovyBugError
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 fulfilled that should be fulfilled.
Properties Summary
Type | Name and description |
---|---|
String |
bugText |
Constructor Summary
Constructor and description |
---|
GroovyBugError
(String message) constructs a bug error using the given text |
GroovyBugError
(Exception exception) Constructs a bug error using the given exception |
GroovyBugError
(String msg, Exception exception) Constructs a bug error using the given exception and a text with additional information about the cause |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
String |
getBugText() Returns the bug text to describe this error | |
Throwable |
getCause() | |
String |
getMessage() Returns the detail message string of this error. | |
void |
setBugText(String msg) Sets the bug text to describe this error | |
String |
toString() Returns a String representation of this class by calling getMessage() . |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class AssertionError | printStackTrace, printStackTrace, printStackTrace, fillInStackTrace, getCause, initCause, toString, addSuppressed, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, setStackTrace, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Property Detail
String bugText
Constructor Detail
public GroovyBugError(String message)
constructs a bug error using the given text
- Parameters:
-
message
- the error message text
public GroovyBugError(Exception exception)
Constructs a bug error using the given exception
- Parameters:
-
exception
- cause of this error
public GroovyBugError(String msg, 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
public String getBugText()
Returns the bug text to describe this error
public Throwable getCause()
public 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.
public void setBugText(String msg)
Sets the bug text to describe this error
public String toString()
Returns a String representation of this class by calling getMessage()
.
- See Also:
- getMessage()
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/org/codehaus/groovy/GroovyBugError.html