Skip to content

Commit

Permalink
Add better error message for crosstester
Browse files Browse the repository at this point in the history
  • Loading branch information
espertus committed Oct 18, 2023
1 parent bc68984 commit 3639fb7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/com/spertus/jacquard/crosstester/CrossTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,15 @@ public List<Result> run() throws ClassNotFoundException {
// Create LauncherDiscoveryRequest.
LauncherDiscoveryRequestBuilder builder = LauncherDiscoveryRequestBuilder.request();
for (String putName : putNames) {
Class<?> test = Class.forName(putName + "." + testClass.getSimpleName());
builder.selectors(DiscoverySelectors.selectClass(test));
try {
Class<?> test = Class.forName(putName + "." + testClass.getSimpleName());
builder.selectors(DiscoverySelectors.selectClass(test));
} catch (ClassNotFoundException e) {
throw new ClientException(
"Class could not be found, possibly because this was run through the IDE " +
"instead of with the proper script.", e);

}
}
LauncherDiscoveryRequest request = builder.build();

Expand Down

0 comments on commit 3639fb7

Please sign in to comment.