Package com.linkedin.common.callback

Examples of com.linkedin.common.callback.MultiException


  @Test
  public void testStack()
  {
    Exception e1 = new Exception();
    e1.setStackTrace(new StackTraceElement[]{ new StackTraceElement("fooClass", "fooMethod", "fooFile", 1) });
    MultiException me = new MultiException(Collections.singleton(e1));
    Exception e2 = new Exception("wraps", me);
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    e2.printStackTrace(pw);
    pw.close();
View Full Code Here


  @Test
  public void testStringNoMessage()
  {
    Exception e1 = new Exception("firstCause");
    MultiException me = new MultiException(Collections.singleton(e1));
    String string = me.toString();
    Assert.assertTrue(string.contains("firstCause"));
    Assert.assertTrue(string.contains("java.lang.Exception"));
    Assert.assertTrue(string.contains(MultiException.class.getName()));
  }
View Full Code Here

  @Test
  public void testStringMessage()
  {
    Exception e1 = new Exception("firstCause");
    MultiException me = new MultiException("overallMessage", Collections.singleton(e1));
    String string = me.toString();
    Assert.assertTrue(string.contains("overallMessage"));
    Assert.assertTrue(string.contains("firstCause"));
    Assert.assertTrue(string.contains("java.lang.Exception"));
    Assert.assertTrue(string.contains(MultiException.class.getName()));
  }
View Full Code Here

TOP

Related Classes of com.linkedin.common.callback.MultiException

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.