class ExceptionUtils {

  public static String buildExceptionMessage(
      final String message,
      final Throwable cause) {
    if (null == cause) {
      return message;
    }
    final StringBuilder sb = new StringBuilder();
    if (null != message) {
      sb.append(message).append("; ");
    }

    sb.append("nested exception is ").append(cause);
    return sb.toString();
  }

}