mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow --show-stacktraces on bootstrap phase
This commit is contained in:
@@ -42,6 +42,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
@@ -68,7 +69,14 @@ public class NBCLI {
|
||||
NBCLI cli = new NBCLI("eb");
|
||||
cli.run(args);
|
||||
} catch (Exception e) {
|
||||
String error = ScenarioErrorHandler.handle(e, false);
|
||||
boolean showStackTraces = false;
|
||||
for (String arg : args) {
|
||||
if (arg.toLowerCase(Locale.ROOT).equals("--show-stacktraces")) {
|
||||
showStackTraces=true;
|
||||
}
|
||||
}
|
||||
|
||||
String error = ScenarioErrorHandler.handle(e, showStackTraces);
|
||||
// Commented for now, as the above handler should do everything needed.
|
||||
if (error != null) {
|
||||
System.err.println("Scenario stopped due to error. See logs for details.");
|
||||
|
||||
@@ -357,6 +357,10 @@ public class NBCLIOptions {
|
||||
arglist.removeFirst();
|
||||
consoleLoggingPattern = readWordOrThrow(arglist, "logging pattern");
|
||||
break;
|
||||
case SHOW_STACKTRACES:
|
||||
arglist.removeFirst();
|
||||
showStackTraces = true;
|
||||
break;
|
||||
default:
|
||||
nonincludes.addLast(arglist.removeFirst());
|
||||
}
|
||||
@@ -440,10 +444,6 @@ public class NBCLIOptions {
|
||||
arglist.removeFirst();
|
||||
showScript = true;
|
||||
break;
|
||||
case SHOW_STACKTRACES:
|
||||
arglist.removeFirst();
|
||||
showStackTraces = true;
|
||||
break;
|
||||
case LIST_METRICS:
|
||||
arglist.removeFirst();
|
||||
arglist.addFirst("start");
|
||||
|
||||
Reference in New Issue
Block a user