|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.develop.exception.ThrowableSugar
Untamed: A sweetener defining extra messages that may be e-sent to a Throwable
Field Summary | |
static String |
ProblemIndent
Enabled: Same number of spaces as in the ProblemPrefix |
static String |
ProblemPrefix
Enabled: the standard "problem: " prefix |
Constructor Summary | |
private |
ThrowableSugar()
prevents instantiation |
Method Summary | |
static RuntimeException |
backtrace(Throwable self,
String optMsg)
Enabled: Returns self annotated by `*** $optMsg`. |
static String |
eStack(Throwable self)
Enabled: Returns the backtrace annotations wrapping the leaf exception, one per line. |
static String |
javaStack(Throwable self)
Enabled: Returns the java backtrace stack of the leaf throwable with all newlines as '\n's. |
static Throwable |
leaf(Throwable self)
Enabled: Return the non-wrapping throwable at the end of a wrapping chain |
static void |
printThrowableOn(Throwable self,
Writer out)
Enabled: In general, a Throwable prints as 'problem: |
static Throwable |
unwrap(Throwable self)
Enabled: Returns the Throwable wrapped by self. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ProblemPrefix
public static final String ProblemIndent
Constructor Detail |
private ThrowableSugar()
Method Detail |
public static void printThrowableOn(Throwable self, Writer out)
If the msg is null, then prints as just 'problem:
This really should be '__printOn', but because of layering issues, we
rename it and make a special case in the MirandaMethods.__printOn().
public static Throwable unwrap(Throwable self)
public static Throwable leaf(Throwable self)
public static String eStack(Throwable self)
public static RuntimeException backtrace(Throwable self, String optMsg)
optMsg
- may equivalently be null or "", in which case it will be
ignored by eStack().public static String javaStack(Throwable self)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |