|
||||||||||
| 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.icesoft.pdf.util.Debug
Use this class (instead of System.ou) for printing all debuggin information.
| Field Summary | |
static boolean |
all
Activates all printings / checks. |
static boolean |
check
Support for design by contract. |
static boolean |
chk
Triggers exception throwing on code errors. |
static boolean |
ex
Should print exception stack traces. |
static boolean |
extra
Enables various additional debug facilities. |
static boolean |
trace
Should print trace strings. |
| Method Summary | |
static void |
bug()
Throw RuntimeException to indicate broken arguments/state |
static void |
checkOrderLE(int a,
int b,
int c)
Check if a ≤ b ≤ c holds and throws an exception if not. |
static void |
checkOrderLE(int a,
int b,
int c,
int d)
Check if a ≤ b ≤ c ≤ d holds and throws an exception if not. |
static void |
ex(Throwable exception)
Print exception stack. |
static String |
getStackPrintoutAsString(Throwable ex)
|
static void |
p(String str)
Print debug string. |
static void |
s()
Print stack trace. |
static void |
s(String message)
Print stack trace annotated with message. |
static void |
trace(String s)
Print trace text if in trace mode. |
static void |
traceAsIs(String s)
|
static void |
traceStack(String title)
|
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final boolean all
public static final boolean trace
public static final boolean ex
public static final boolean chk
public static final boolean extra
Enables various additional debug facilities. Currently used properties:
public static final boolean check
bug(),
Constant Field Values| Method Detail |
public static String getStackPrintoutAsString(Throwable ex)
public static void p(String str)
public static void s()
public static void s(String message)
public static void trace(String s)
if (Debug.trace) Debug.trace(...)
public static void traceAsIs(String s)
public static void traceStack(String title)
public static void ex(Throwable exception)
try {
some code
} catch (IOException ex) {
if (Debug.ex) Debug.ex(ex);
if (Debug.trace) Debug.trace("Unexpected IO error: "+ex);
}
public static void bug()
void setWisth(int width) {
if (Debug.check && width < 0) Debug.bug();
...
}
check
public static void checkOrderLE(int a,
int b,
int c)
a ≤ b ≤ c holds and throws an exception if not.
public static void checkOrderLE(int a,
int b,
int c,
int d)
a ≤ b ≤ c ≤ d holds and throws an exception if not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||