org.apache.bcel.verifier.exc

## Class AssertionViolatedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.bcel.verifier.exc.AssertionViolatedException

- All Implemented Interfaces:
    Serializable

      public final class AssertionViolatedException
      extends RuntimeException

  Instances of this class should never be thrown. When such an instance is thrown, this is due to an INTERNAL ERROR of BCEL's class file verifier "JustIce".
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssertionViolatedException()` Constructs a new AssertionViolatedException with null as its error message string.
    `AssertionViolatedException(String message)` Constructs a new AssertionViolatedException with the specified error message preceded by "INTERNAL ERROR: ".
    `AssertionViolatedException(String message, Throwable initCause)` Constructs a new AssertionViolationException with the specified error message and initial cause

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `extendMessage(String pre, String post)` Extends the error message with a string before ("pre") and after ("post") the 'old' error message.
    `String` | `getMessage()` Returns the error message string of this AssertionViolatedException object.
    `static void` | `main(String[] args)` DO NOT USE.

    - ### 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`

- - ### Constructor Detail

    - #### AssertionViolatedException

          public AssertionViolatedException()

      Constructs a new AssertionViolatedException with null as its error message string.

    - #### AssertionViolatedException

          public AssertionViolatedException(String message)

      Constructs a new AssertionViolatedException with the specified error message preceded by "INTERNAL ERROR: ".

    - #### AssertionViolatedException

          public AssertionViolatedException(String message,
                                            Throwable initCause)

      Constructs a new AssertionViolationException with the specified error message and initial cause
      Since:
        6.0

  - ### Method Detail

    - #### main

          public static void main(String[] args)

      DO NOT USE. It's for experimental testing during development only.

    - #### extendMessage

          public void extendMessage(String pre,
                                    String post)

      Extends the error message with a string before ("pre") and after ("post") the 'old' error message. All of these three strings are allowed to be null, and null is always replaced by the empty string (""). In particular, after invoking this method, the error message of this object can no longer be null.

    - #### getMessage

          public String getMessage()

      Returns the error message string of this AssertionViolatedException object.
      Overrides:
        `getMessage` in class `Throwable`
      Returns:
        the error message string of this AssertionViolatedException.

Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.