|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.esi.outils.Debug
Classe d'outil pour vérifier les paramettres d'une fonction, manier les exceptions, et pour quitter la programme si il y a une erreur.
Method Summary | |
static void |
ASSERT(boolean expression,
java.lang.String message)
Assert that a programming statement is true. |
static void |
ASSERT(java.lang.Object object)
Same as the ASSERT(Object) method however requires no error message. |
static void |
ASSERT(java.lang.Object object,
java.lang.String message)
Similar to the ASSERT(boolean, String) method, however asserts that the given object is not null. |
static void |
EXCEPTION(java.lang.Exception e,
java.lang.String message)
Calls the EXIT method using the error message and e.toString(). |
static void |
EXIT(java.lang.String message)
Print the given message to standard error, print the current stack trace and exit the program with a return value of 1. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void EXIT(java.lang.String message)
public static void ASSERT(boolean expression, java.lang.String message)
For example:
Debug.ASSERT( noodleFactory.contains("Shrimp flavour"), "Noodle factory does not contain shrimp flavour!");
public static void ASSERT(java.lang.Object object, java.lang.String message)
public static void ASSERT(java.lang.Object object)
public static void EXCEPTION(java.lang.Exception e, java.lang.String message)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |