| Modifier and Type | Field and Description |
|---|---|
| private StringBuffer | context
|
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | ExceptionWithContext(String
human-oriented message message, Throwable null-ok; exception that caused this oneConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public String | |
| public void | |
| public void | |
| public void | printStackTrace(PrintStream
PrintStream to use for outputOverrides java. |
| public void | printStackTrace(PrintWriter
PrintWriter to use for outputOverrides java. |
| public static ExceptionWithContext | Returns: non-null; an appropriate instancenon-null; the exception to augmentnon-null; context to addAugments the given exception with the given context, and return the result. |
| context | back to summary |
|---|---|
| private StringBuffer context
| |
| ExceptionWithContext | back to summary |
|---|---|
| public ExceptionWithContext(String message) Constructs an instance.
| |
| ExceptionWithContext | back to summary |
|---|---|
| public ExceptionWithContext(Throwable cause) Constructs an instance.
| |
| ExceptionWithContext | back to summary |
|---|---|
| public ExceptionWithContext(String message, Throwable cause) Constructs an instance. | |
| addContext | back to summary |
|---|---|
| public void addContext(String str) Adds a line of context to this instance.
| |
| getContext | back to summary |
|---|---|
| public String getContext() Gets the context.
| |
| printContext | back to summary |
|---|---|
| public void printContext(PrintStream out) Prints the message and context.
| |
| printContext | back to summary |
|---|---|
| public void printContext(PrintWriter out) Prints the message and context.
| |
| printStackTrace | back to summary |
|---|---|
| public void printStackTrace(PrintStream out) Overrides java. Doc from java. Prints this throwable and its backtrace to the specified print stream.
| |
| printStackTrace | back to summary |
|---|---|
| public void printStackTrace(PrintWriter out) Overrides java. Doc from java. Prints this throwable and its backtrace to the specified print writer.
| |
| withContext | back to summary |
|---|---|
| public static ExceptionWithContext withContext(Throwable ex, String str) Augments the given exception with the given context, and return the
result. The result is either the given exception if it was an
| |