|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.thdl.util.ThdlDebug
This uninstantiable class provides assertions and the like in a JVM-version-independent fashion.
Method Summary | |
static void |
abort(String message)
Exits the program the hard way. |
static void |
attemptToSetUpLogFile(String prefix,
String suffix)
Sets it up so that a call to System.out or System.err prints to standard output/error but ALSO prints to the log file named (prefix + suffix). |
static void |
handleClasspathError(String whoseWhat,
Throwable error)
Exits the program with a message that the CLASSPATH is not set properly. |
static void |
noteIffyCode()
Call this from control-flow paths that are not well thought out. |
static void |
verify(boolean condition)
Throws an unchecked exception if condition is not true. |
static void |
verify(String msg,
boolean condition)
Throws an unchecked exception if condition is not true. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void verify(boolean condition)
public static void verify(String msg, boolean condition) throws ThdlLazyException
ThdlLazyException
- if condition is not truepublic static void noteIffyCode() throws ThdlLazyException
'java
-Dthdl.debug=true'
or the properties files) in order to
test the code's robustness.
Throws a THDL-specific exception so that you can catch these
specially in case you want to ignore them.
ThdlLazyException
- if the thdl.debug option is set to
"true"public static void handleClasspathError(String whoseWhat, Throwable error)
public static void abort(String message)
public static void attemptToSetUpLogFile(String prefix, String suffix)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |