org.exist.util.sanity
Class SanityCheck
java.lang.Object
org.exist.util.sanity.SanityCheck
public class SanityCheck
- extends Object
Utility class for sanity checks. Provides static methods ASSERT, THROW_ASSERT
which can be used in the code to react to unexpected conditions. ASSERT(boolean)
logs a stack trace to the log4j log output. THROW_ASSERT(boolean)
throws an additional runtime exception.
- Author:
- wolf
SanityCheck
public SanityCheck()
ASSERT
public static final void ASSERT(boolean mustBeTrue)
ASSERT
public static final void ASSERT(boolean mustBeTrue,
String failureMsg)
THROW_ASSERT
public static final void THROW_ASSERT(boolean mustBeTrue)
THROW_ASSERT
public static final void THROW_ASSERT(boolean mustBeTrue,
String failureMsg)
TRACE
public static final void TRACE(String msg)
PRINT_STACK
public static final void PRINT_STACK(int level)
Copyright (C) Wolfgang Meier. All rights reserved.