Skip to content

Commit

Permalink
Merge pull request #7241 from Channyboy/1792-unclearErrorMessageMpMet…
Browse files Browse the repository at this point in the history
…rics

1792 unclear error message mp metrics
  • Loading branch information
Channyboy committed Apr 18, 2019
2 parents 91cb55e + d961406 commit e11e3f8
Showing 1 changed file with 4 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2018 IBM Corporation and others.
* Copyright (c) 2017, 2019 IBM Corporation and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -443,7 +443,9 @@ private <T extends Metric> T getOrAdd(Metadata metadata, MetricBuilder<T> builde
}
}
}
throw new IllegalArgumentException(metadata.getName() + " is already used for a different type of metric");
throw new IllegalArgumentException(metadata.getName() + " is already used for a different type of metric. "
+ "A metric name can only be used with one type of metric. Ensure that " + metadata.getName()
+ " is used with only one type of metric.");
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit e11e3f8

Please sign in to comment.