@Test public void testToStringWithNullMessage() { assertThat(new LinkException(LinkId.of("foo")).toString()) .isEqualTo("org.interledger.link.exceptions.LinkException: LinkId=LinkId(foo)"); }
@Override public String toString() { String linkIdMessage = "LinkId=" + getLinkId(); String className = getClass().getName(); String message = getLocalizedMessage() == null ? linkIdMessage : getLocalizedMessage() + " " + linkIdMessage; return (className + ": " + message); }
LinkException extends RuntimeException { @Override public String toString() { String linkIdMessage = "LinkId=" + getLinkId(); String className = getClass().getName(); String message = getLocalizedMessage() == null ? linkIdMessage : getLocalizedMessage() + " " + linkIdMessage; return (className + ": " + message); } }
LinkException extends RuntimeException { @Override public String toString() { String linkIdMessage = "LinkId=" + getLinkId(); String className = getClass().getName(); String message = getLocalizedMessage() == null ? linkIdMessage : getLocalizedMessage() + " " + linkIdMessage; return (className + ": " + message); } LinkException(LinkId linkId);  LinkException(String message, LinkId linkId);  LinkException(String message, Throwable cause, LinkId linkId);  LinkException(Throwable cause, LinkId linkId);  LinkException(
      String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, LinkId linkId
  ); }
LinkException extends RuntimeException { @Override public String toString() { String linkIdMessage = "LinkId=" + getLinkId(); String className = getClass().getName(); String message = getLocalizedMessage() == null ? linkIdMessage : getLocalizedMessage() + " " + linkIdMessage; return (className + ": " + message); } LinkException(LinkId linkId);  LinkException(String message, LinkId linkId);  LinkException(String message, Throwable cause, LinkId linkId);  LinkException(Throwable cause, LinkId linkId);  LinkException(
      String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, LinkId linkId
  ); LinkId getLinkId(); @Override String toString(); }
LinkException extends RuntimeException { @Override public String toString() { String linkIdMessage = "LinkId=" + getLinkId(); String className = getClass().getName(); String message = getLocalizedMessage() == null ? linkIdMessage : getLocalizedMessage() + " " + linkIdMessage; return (className + ": " + message); } LinkException(LinkId linkId);  LinkException(String message, LinkId linkId);  LinkException(String message, Throwable cause, LinkId linkId);  LinkException(Throwable cause, LinkId linkId);  LinkException(
      String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, LinkId linkId
  ); LinkId getLinkId(); @Override String toString();  }