Provide additional instructions when driver adapter is missing (#2083)

* Provide additional instructions when driver adapter is missing

* Include instructions on the command line option output
This commit is contained in:
Dave Fisher 2024-11-15 09:58:50 -08:00 committed by GitHub
parent 02791ec8aa
commit 1330223232
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -284,6 +284,9 @@ public class NBCLI implements Function<String[], Integer>, NBLabeledElement {
}
if (options.wantsActivityTypes()) {
new ActivityTypeLoader().getAllSelectors().forEach(System.out::println);
System.out.println("\nIf the driver adapter needed is missing from this list, rebuild NB5 to include the driver adapter.\n"+
"Change '<activeByDefault>false</activeByDefault>' for the driver in "+
"'./nb-adapters/pom.xml' and './nb-adapters/nb-adapters-included/pom.xml' first.");
return NBCLI.EXIT_OK;
}

View File

@ -85,7 +85,10 @@ public class StandardActivity<R extends java.util.function.LongFunction, S> exte
.map(l -> l.load(this, NBLabels.forKV()));
if (defaultDriverName.isPresent() && defaultAdapter.isEmpty()) {
throw new BasicError("Unable to load default driver adapter '" + defaultDriverName.get() + '\'');
throw new BasicError("Unable to load '" + defaultDriverName.get() + "' driver adapter.\n"+
"Rebuild NB5 to include this driver adapter. "+
"Change '<activeByDefault>false</activeByDefault>' for the driver in "+
"'./nb-adapters/pom.xml' and './nb-adapters/nb-adapters-included/pom.xml' first.");
}
// HERE, op templates are loaded before drivers are loaded