Examples of AssertionFailedException


Examples of com.vividsolutions.jts.util.AssertionFailedException

   *@throws  AssertionFailedException  if the condition is false
   */
  public static void isTrue(boolean assertion, String message) {
    if (!assertion) {
      if (message == null) {
        throw new AssertionFailedException();
      }
      else {
        throw new AssertionFailedException(message);
      }
    }
  }
View Full Code Here

Examples of com.vividsolutions.jts.util.AssertionFailedException

   *@param  message                    a description of the assertion
   *@throws  AssertionFailedException  if the two objects are not equal
   */
  public static void equals(Object expectedValue, Object actualValue, String message) {
    if (!actualValue.equals(expectedValue)) {
      throw new AssertionFailedException("Expected " + expectedValue + " but encountered "
           + actualValue + (message != null ? ": " + message : ""));
    }
  }
View Full Code Here

Examples of com.vividsolutions.jts.util.AssertionFailedException

   *
   *@param  message                    a description of the assertion
   *@throws  AssertionFailedException  thrown always
   */
  public static void shouldNeverReachHere(String message) {
    throw new AssertionFailedException("Should never reach here"
         + (message != null ? ": " + message : ""));
  }
View Full Code Here

Examples of com.vividsolutions.jts.util.AssertionFailedException

                }
                if (VALUE_OBJ_FIELD_NON_RECURSIVE_TYPE.contains(type) || isJavaType(type)) {
                    continue;
                }
                if (VALUE_OBJ_FIELD_TYPE_THAT_SHOULD_BE_P_TYPE.contains(type)) {
                    throw new AssertionFailedException(typeToTest.getName() + "#" + attribute.getName() + " should not be a field in a" +
                                                       " value object.  Instead use the more general " + PArray.class.getName() + " or " +
                                                       PObject.class.getName());
                }
                tested.add(type);
                validateParamObject(type, tested);
View Full Code Here

Examples of com.vividsolutions.jts.util.AssertionFailedException

                        append("parameters have the correct type.\n\n").
                        append(wrongType);
            }

            if (finalError.length() > 0) {
                throw new AssertionFailedException(finalError.toString());
            }

        }
    }
View Full Code Here

Examples of com.vividsolutions.jts.util.AssertionFailedException

                    append("parameters have the correct type.\n\n").
                    append(wrongType);
        }

        if (finalError.length() > 0) {
            throw new AssertionFailedException(finalError.toString());
        }
    }
View Full Code Here

Examples of org.eclipse.core.runtime.AssertionFailedException

            null, // no access rules
            false, // no accessible files to combine
            NO_EXTRA_ATTRIBUTES);
        break;
      default :
        throw new AssertionFailedException(Messages.bind(Messages.classpath_unknownKind, kindAttr));
    }

    if (unknownAttributes != null || unknownChildren != null) {
      UnknownXmlElements unknownXmlElements = new UnknownXmlElements();
      unknownXmlElements.attributes = unknownAttributes;
View Full Code Here

Examples of org.eclipse.core.runtime.AssertionFailedException

    return result;
  }

  private void logWarning(String message, Object source, Saveable model) {
    // create a new exception
    AssertionFailedException assertionFailedException = new AssertionFailedException("unknown saveable: " + model //$NON-NLS-1$
        + " from part: " + source); //$NON-NLS-1$
    // record the current stack trace to help with debugging
    assertionFailedException.fillInStackTrace();
    WorkbenchPlugin.log(StatusUtil.newStatus(IStatus.WARNING, message,
        assertionFailedException));
  }
View Full Code Here

Examples of org.eclipse.core.runtime.AssertionFailedException

   *
   * @param message
   *            the message to include in the exception
   */
  public static void fail(String message) {
    throw new AssertionFailedException(message);
  }
View Full Code Here

Examples of org.eclipse.core.runtime.AssertionFailedException

            if (special instanceof Token) {
                special = ((Token) special).asSpecialStr();
            } else {
                if (special instanceof String) {
                    throw new AssertionFailedException("assertion failed: Special: " + special + " is not valid");
                }
            }

            if (after) {
                if (special instanceof commentType) {
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.