November 2004
Intermediate to advanced
212 pages
5h 2m
English
AssertionFailedError
AssertionFailedError
(see Figure B-2) is a
class representing an assertion failure. Aside from being a distinct
subclass, it is otherwise identical to Error.
Thus, it is Throwable and contains a stack trace.
The assert methods in Assert throw an
AssertionFailedError (or a subclass of it) when an
assertion fails. The AssertionFailedError
conveniently captures the stack trace of the code location from which
it was thrown, making it easy to find the assertion that failed.
![]() |
public class AssertionFailedError extends java.lang.Error
public AssertionFailedError( )
public AssertionFailedError(String message)
The constructors for AssertionFailedError.
None.
None.
None.
Read now
Unlock full access