Class GroovyBugError

  • All Implemented Interfaces:
    Serializable

    public class GroovyBugError
    extends 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 fulfilled that should be fulfilled.
    See Also:
    Serialized Form
    • Constructor Detail

      • GroovyBugError

        public GroovyBugError​(String message)
        constructs a bug error using the given text
        Parameters:
        message - the error message text
      • GroovyBugError

        public GroovyBugError​(Exception exception)
        Constructs a bug error using the given exception
        Parameters:
        exception - cause of this error
      • GroovyBugError

        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

      • getMessage

        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: "
        Overrides:
        getMessage in class Throwable
        Returns:
        the detail message string of this error.
      • getBugText

        public String getBugText()
        Returns the bug text to describe this error
      • setBugText

        public void setBugText​(String msg)
        Sets the bug text to describe this error