Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

add warning log of tunnelHost before throw exception #1495

Merged
merged 1 commit into from
Oct 15, 2016

Conversation

Yaliang
Copy link
Contributor

@Yaliang Yaliang commented Oct 15, 2016

No description provided.

@kramasamy kramasamy merged commit 66e1c7f into apache:master Oct 15, 2016
@@ -77,6 +77,7 @@ public void initialize(Config newConfig) {

String newConnectionString = tunneledResults.first;
if (newConnectionString.isEmpty()) {
LOG.warning("Cannot connect to tunnelHost: " + tunnelConfig.getTunnelHost());
throw new IllegalArgumentException("Bad connectionString: " + connectionString);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically we should log or throw but not both. Could we add the log messaging to the exception message and remove the LOG.warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in PR #1498

nicknezis pushed a commit that referenced this pull request Sep 14, 2020
add warning log of tunnelHost before throw exception
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants