public class AssertFailure
extends java.lang.RuntimeException
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
threadDump |
Constructor and Description |
---|
AssertFailure()
This constructor expects no arguments or nested error.
|
AssertFailure(java.lang.String message)
This constructor takes the just the message for this error.
|
AssertFailure(java.lang.String message,
java.lang.Throwable nestedError)
This constructor takes the pieces of information
expected for each error.
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
dumpThreads()
Dumps stack traces for all the threads if the JVM supports it.
|
java.lang.String |
getThreadDump()
Returns the thread dump stored in this AssertFailure as a string.
|
void |
printStackTrace()
Overrides printStackTrace() in java.lang.Throwable to include
the thread dump after the normal stack trace.
|
void |
printStackTrace(java.io.PrintStream s)
Overrides printStackTrace(PrintStream s) in java.lang.Throwable
to include the thread dump after the normal stack trace.
|
void |
printStackTrace(java.io.PrintWriter s)
Overrides printStackTrace(PrintWriter s) in java.lang.Throwable
to include the thread dump after the normal stack trace.
|
private boolean |
supportsThreadDump()
Tells if generating a thread dump is supported in the running JVM.
|
public AssertFailure(java.lang.String message, java.lang.Throwable nestedError)
message
- the message associated with
the error.nestedError
- errors can be nested together;
if this error has another error associated with it,
it is specified here. The 'outermost' error should be
the most severe error; inner errors should be providing
additional information about what went wrong.public AssertFailure(java.lang.String message)
message
- the message associated with the error.public AssertFailure()
public java.lang.String getThreadDump()
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter s)
printStackTrace
in class java.lang.Throwable
private boolean supportsThreadDump()
private java.lang.String dumpThreads()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.