stringBuilder.append(" gateway - ").append(gatewayId);
stringBuilder.append(" token id - ").append(credential.getToken());
log.error(stringBuilder.toString(), e);
throw new CredentialStoreException(stringBuilder.toString(), e);
} catch (UnsupportedEncodingException e) {
StringBuilder stringBuilder = new StringBuilder(
"Error persisting community credentials. Unsupported encoding.");
stringBuilder.append(" gateway - ").append(gatewayId);
stringBuilder.append(" token id - ").append(credential.getToken());
log.error(stringBuilder.toString(), e);
throw new CredentialStoreException(stringBuilder.toString(), e);
} catch (IOException e) {
StringBuilder stringBuilder = new StringBuilder(
"Error persisting community credentials. Error serializing " + "credentials.");
stringBuilder.append(" gateway - ").append(gatewayId);
stringBuilder.append(" community user name - ").append(credential.getToken());
log.error(stringBuilder.toString(), e);
throw new CredentialStoreException(stringBuilder.toString(), e);
} finally {
DBUtil.cleanup(preparedStatement);
}
}