mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
fix for error handler NPE
This commit is contained in:
parent
99f15f90ba
commit
b53c9c6e4e
@ -321,9 +321,11 @@ public class NBCLI {
|
|||||||
ShutdownManager.shutdown();
|
ShutdownManager.shutdown();
|
||||||
|
|
||||||
if (scenariosResults.hasError()) {
|
if (scenariosResults.hasError()) {
|
||||||
logger.info(scenariosResults.getExecutionSummary());
|
logger.warn(scenariosResults.getExecutionSummary());
|
||||||
|
logger.error("error running scenario:",scenariosResults.getOne().getException().get());
|
||||||
System.exit(2);
|
System.exit(2);
|
||||||
} else {
|
} else {
|
||||||
|
logger.info(scenariosResults.getExecutionSummary());
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ public class ScenarioErrorHandler {
|
|||||||
|
|
||||||
private static void handleInternalError(Exception e, boolean wantsStackTraces) {
|
private static void handleInternalError(Exception e, boolean wantsStackTraces) {
|
||||||
String prefix = "internal error: ";
|
String prefix = "internal error: ";
|
||||||
if (!e.getCause().getClass().getCanonicalName().contains("io.nosqlbench")) {
|
if (e.getCause()!=null && !e.getCause().getClass().getCanonicalName().contains("io.nosqlbench")) {
|
||||||
prefix = "Error from driver or included library: ";
|
prefix = "Error from driver or included library: ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user