Examples of AssertFailure


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

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

   */
  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

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

    // 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

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

   * @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

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

   * @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

Examples of org.apache.derby.shared.common.sanity.AssertFailure

     * with java.lang.RuntimePermission "getStackTrace" and
     * java.lang.RuntimePermission "modifyThreadGroup".
     */
    public void testAssertFailureThreadDump() {

        String s = new AssertFailure("AssertFailureTest").getThreadDump();
        //System.out.println(s);    //Debug failures

        // Assert that the string is correct, by checking that
        // it starts the right way.
        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_15) {
View Full Code Here

Examples of org.apache.derby.shared.common.sanity.AssertFailure

     * WITHOUT java.lang.RuntimePermission "getStackTrace" and
     * java.lang.RuntimePermission "modifyThreadGroup";
     */
    public void testAssertFailureNoThreadDump() {

        String s = new AssertFailure("AssertFailureTest").getThreadDump();
        //System.out.println(s);    //Debug failures.

        // Assert that the string is correct, by checking that is starts
        // the right way.
        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_15) {
View Full Code Here

Examples of org.apache.derby.shared.common.sanity.AssertFailure

     * with java.lang.RuntimePermission "getStackTrace" and
     * java.lang.RuntimePermission "modifyThreadGroup".
     */
    public void testAssertFailureThreadDump() {

        String s = new AssertFailure("AssertFailureTest").getThreadDump();
        //System.out.println(s);    //Debug failures

        // Assert that the string is correct, by checking that
        // it starts the right way.
        String expected = "---------------\n" +
View Full Code Here

Examples of org.apache.derby.shared.common.sanity.AssertFailure

     * WITHOUT java.lang.RuntimePermission "getStackTrace" and
     * java.lang.RuntimePermission "modifyThreadGroup";
     */
    public void testAssertFailureNoThreadDump() {

        String s = new AssertFailure("AssertFailureTest").getThreadDump();
        //System.out.println(s);    //Debug failures.

        // Assert that the string is correct, by checking that is starts
        // the right way.
        String expected = "(Skipping thread dump because of insufficient " +
View Full Code Here

Examples of org.apache.derby.shared.common.sanity.AssertFailure

     * with java.lang.RuntimePermission "getStackTrace" and
     * java.lang.RuntimePermission "modifyThreadGroup".
     */
    public void testAssertFailureThreadDump() {

        String s = new AssertFailure("AssertFailureTest").getThreadDump();
        //System.out.println(s);    //Debug failures

        // Assert that the string is correct, by checking that
        // it starts the right way.
        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_15) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.