Package com.google.gwt.core.shared

Examples of com.google.gwt.core.shared.SerializableThrowable


  @ExpectedFailure(withType = SomeNonSerializableException.class)
  public void testThrowsNonSerializableException_hasMetaData() throws Throwable {
    if (!Object.class.getName().equals("java.lang.Object")) {
      // If there is no metadata lets make the test case happy
      SerializableThrowable throwable = SerializableThrowable.fromThrowable(new Exception());
      throwable.setDesignatedType(
          "com.google.gwt.junit.client.GWTTestCaseTest$SomeNonSerializableException", true);
      throw throwable;
    }
    testThrowsNonSerializableException();
  }
View Full Code Here


      }
    });
  }

  public void testSerializableThrowable() {
    SerializableThrowable expected = new SerializableThrowable(null, "msg");
    expected.setDesignatedType("x", true);
    expected.setStackTrace(new StackTraceElement[] {new StackTraceElement("c", "m", "f", 42)});
    expected.initCause(new SerializableThrowable(null, "cause"));

    checkException(expected, new AsyncCallback<SerializableThrowable>() {
      @Override
      public void onFailure(Throwable caught) {
        TestSetValidator.rethrowException(caught);
View Full Code Here

  @GwtIncompatible
  private Class<?> getExceptionClass(Throwable t) {
    if (t instanceof SerializableThrowable) {
      try {
        SerializableThrowable throwableWithClassName = (SerializableThrowable) t;
        return Class.forName(throwableWithClassName.getDesignatedType());
      } catch (Exception e) {
        // Nothing to do here, just fallback to #getClass
      }
    }
    return t.getClass();
View Full Code Here

TOP

Related Classes of com.google.gwt.core.shared.SerializableThrowable

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.