|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.android.dex.util.ExceptionWithContext
public class ExceptionWithContext
Exception which carries around structured context.
| Constructor Summary | |
|---|---|
ExceptionWithContext(String message)
Constructs an instance. |
|
ExceptionWithContext(String message,
Throwable cause)
Constructs an instance. |
|
ExceptionWithContext(Throwable cause)
Constructs an instance. |
|
| Method Summary | |
|---|---|
void |
addContext(String str)
Adds a line of context to this instance. |
String |
getContext()
Gets the context. |
void |
printContext(PrintStream out)
Prints the message and context. |
void |
printContext(PrintWriter out)
Prints the message and context. |
void |
printStackTrace(PrintStream out)
|
void |
printStackTrace(PrintWriter out)
|
static ExceptionWithContext |
withContext(Throwable ex,
String str)
Augments the given exception with the given context, and return the result. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionWithContext(String message)
message - human-oriented messagepublic ExceptionWithContext(Throwable cause)
cause - null-ok; exception that caused this one
public ExceptionWithContext(String message,
Throwable cause)
message - human-oriented messagecause - null-ok; exception that caused this one| Method Detail |
|---|
public static ExceptionWithContext withContext(Throwable ex,
String str)
ExceptionWithContext, or a newly-constructed exception if it
was not.
ex - non-null; the exception to augmentstr - non-null; context to add
non-null; an appropriate instancepublic void printStackTrace(PrintStream out)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter out)
printStackTrace in class Throwablepublic void addContext(String str)
str - non-null; new contextpublic String getContext()
non-null; the contextpublic void printContext(PrintStream out)
out - non-null; where to print topublic void printContext(PrintWriter out)
out - non-null; where to print to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||