diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-08-26 16:43:26 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-08-31 09:49:15 +0200 |
commit | aeccf8fba38eed49136826020d80cf7e0cef9bc6 (patch) | |
tree | 497c61320a87b3d4eaeb1f213e2ec9b486109ab9 /sonar-plugin-api/src | |
parent | c64c933e387608e9b33757b1ec463c7471c367a5 (diff) | |
download | sonarqube-aeccf8fba38eed49136826020d80cf7e0cef9bc6.tar.gz sonarqube-aeccf8fba38eed49136826020d80cf7e0cef9bc6.zip |
SONAR-6730 Improve error message when adding measure on not allowed metric
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/test/ce/measure/MeasureComputerImplementationContext.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/ce/measure/MeasureComputerImplementationContext.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/ce/measure/MeasureComputerImplementationContext.java index a49b2d6611e..17c8944648a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/ce/measure/MeasureComputerImplementationContext.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/ce/measure/MeasureComputerImplementationContext.java @@ -157,7 +157,8 @@ public class MeasureComputerImplementationContext implements MeasureComputer.Imp } private void validateAddMeasure(String metricKey) { - checkArgument(measureComputer.getOutputMetrics().contains(metricKey), "Only metrics in %s can be used to add measures", measureComputer.getOutputMetrics()); + checkArgument(measureComputer.getOutputMetrics().contains(metricKey), "Only metrics in %s can be used to add measures. Metric '%s' is not allowed.", + measureComputer.getOutputMetrics(), metricKey); if (componentMeasureByMetricKey.get(metricKey) != null) { throw new UnsupportedOperationException(String.format("A measure on metric '%s' already exists", metricKey)); } |