com.gargoylesoftware.base.gui

Class ThrowablePanel

public class ThrowablePanel extends JScrollPane

A panel that can display an exception stack trace.

Version: $Revision: 1.5 $

Author: Mike Bowler

Field Summary
static longserialVersionUID
JTextAreatextArea_
Throwablethrowable_
Constructor Summary
ThrowablePanel()
Create a new panel.
ThrowablePanel(Throwable t)
Create a new panel.
Method Summary
protected voidassertNotNull(String fieldName, Object fieldValue)
Verify that the specified value is not null.
ThrowablegetException()
Return the exception that is being displayed.
static StringmakeString(Throwable t)
Make a string from the exception.
voidsetException(Throwable t)
Set the exception that is being displayed.

Field Detail

serialVersionUID

private static final long serialVersionUID

textArea_

private final JTextArea textArea_

throwable_

private Throwable throwable_

Constructor Detail

ThrowablePanel

public ThrowablePanel()
Create a new panel.

ThrowablePanel

public ThrowablePanel(Throwable t)
Create a new panel.

Parameters: t The exception to display.

Method Detail

assertNotNull

protected final void assertNotNull(String fieldName, Object fieldValue)
Verify that the specified value is not null. If it is then throw an exception

Parameters: fieldName The name of the field to check fieldValue The value of the field to check

Throws: DetailedNullPointerException If fieldValue is null

getException

public Throwable getException()
Return the exception that is being displayed.

Returns: The exception.

makeString

private static String makeString(Throwable t)
Make a string from the exception.

Parameters: t The throwable object

Returns: A string containing the stack trace

setException

public void setException(Throwable t)
Set the exception that is being displayed.

Parameters: t The new exception.