Skip to content

Commit 70d0bb0

Browse files
committed
change case of exceptions msg
1 parent 3a36466 commit 70d0bb0

File tree

1 file changed

+4
-4
lines changed
  • jmx-scraper/src/main/java/io/opentelemetry/contrib/jmxscraper

1 file changed

+4
-4
lines changed

jmx-scraper/src/main/java/io/opentelemetry/contrib/jmxscraper/JmxScraper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ static Properties parseArgs(List<String> args)
9797
return new Properties();
9898
}
9999
if (args.size() != 2) {
100-
throw new ArgumentsParsingException("exactly two arguments expected, got " + args.size());
100+
throw new ArgumentsParsingException("Exactly two arguments expected, got " + args.size());
101101
}
102102
if (!args.get(0).equalsIgnoreCase(CONFIG_ARG)) {
103-
throw new ArgumentsParsingException("unexpected first argument must be '" + CONFIG_ARG + "'");
103+
throw new ArgumentsParsingException("Unexpected first argument must be '" + CONFIG_ARG + "'");
104104
}
105105

106106
String path = args.get(1);
@@ -180,10 +180,10 @@ private static void addRulesForSystem(String system, MetricConfiguration conf) {
180180
RuleParser parserInstance = RuleParser.get();
181181
parserInstance.addMetricDefsTo(conf, inputStream, system);
182182
} else {
183-
throw new IllegalStateException("no support for system" + system);
183+
throw new IllegalArgumentException("No support for system" + system);
184184
}
185185
} catch (Exception e) {
186-
throw new IllegalStateException("error while loading rules for system " + system, e);
186+
throw new IllegalStateException("Error while loading rules for system " + system, e);
187187
}
188188
}
189189
}

0 commit comments

Comments
 (0)