Package org.apache.derby.iapi.services.sanity

Examples of org.apache.derby.iapi.services.sanity.AssertFailure


   */
  public static final void ASSERT(boolean mustBeTrue) {
    if (DEBUG)
      if (! mustBeTrue) {
        if (DEBUG) {
          AssertFailure af = new AssertFailure("ASSERT FAILED");
          if (DEBUG_ON("AssertFailureTrace")) {
            showTrace(af);
          }
          throw af;
        }
        else
          throw new AssertFailure("ASSERT FAILED");
      }
  }
View Full Code Here


   */
  public static final void ASSERT(boolean mustBeTrue, String msgIfFail) {
    if (DEBUG)
      if (! mustBeTrue) {
        if (DEBUG) {
          AssertFailure af = new AssertFailure("ASSERT FAILED " + msgIfFail);
          if (DEBUG_ON("AssertFailureTrace")) {
            showTrace(af);
          }
          throw af;
        }
        else
          throw new AssertFailure("ASSERT FAILED " + msgIfFail);
      }
  }
View Full Code Here

    // XXX (nat) Hmm, should we check ASSERT here?  The caller is
    // not expecting this function to return, whether assertions
    // are compiled in or not.

    if (DEBUG) {
      AssertFailure af = new AssertFailure("ASSERT FAILED " + msgIfFail);
      if (DEBUG_ON("AssertFailureTrace")) {
        showTrace(af);
      }
      throw af;
    }
    else
      throw new AssertFailure("ASSERT FAILED " + msgIfFail);
  }
View Full Code Here

   * @see org.apache.derby.iapi.services.sanity.AssertFailure
   */
  public static final void THROWASSERT(String msg, Throwable t) {

    if (DEBUG) {
      AssertFailure af = new AssertFailure("ASSERT FAILED " + t.toString(), t);
      if (DEBUG_ON("AssertFailureTrace")) {
        showTrace(af);
      }
      showTrace(t);
      throw af;
    }
    else {
      showTrace(t);
      throw new AssertFailure("ASSERT FAILED " + t.toString(), t);
    }
  }
View Full Code Here

   * @see org.apache.derby.iapi.services.sanity.AssertFailure
   */
  public static final void THROWASSERT(Throwable t) {

    if (DEBUG) {
      AssertFailure af = new AssertFailure("ASSERT FAILED " + t.toString(), t);
      if (DEBUG_ON("AssertFailureTrace")) {
        showTrace(af);
      }
      showTrace(t);
      throw af;
    }
    else {
      showTrace(t);
      throw new AssertFailure("ASSERT FAILED " + t.toString(), t);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.sanity.AssertFailure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.