detailed stracktrace only when option -d, second implemented in c++
This commit is contained in:
5
ml.cpp
5
ml.cpp
@@ -2162,6 +2162,9 @@ int main(int argc, char *argv[]) {
|
||||
// performance monitor on
|
||||
if (cmdOptionExists(argv, argv + argc, "-p"))
|
||||
MlPerfMon::instance().turnOn();
|
||||
// better stacktrace
|
||||
if (cmdOptionExists(argv, argv + argc, "-d"))
|
||||
MlPerfMon::instance().debugOn();
|
||||
// skip loading std lib
|
||||
if (!cmdOptionExists(argv, argv + argc, "-b")) {
|
||||
load_std_lib(env);
|
||||
@@ -2169,7 +2172,7 @@ int main(int argc, char *argv[]) {
|
||||
// help
|
||||
if (cmdOptionExists(argv, argv + argc, "-h")) {
|
||||
std::cout
|
||||
<< "Usage:\n\t-h print this help\n\t-b skip stdlib loading\n\t-c code - runs code passed on command line\n\t-f source_file - executes code in file\n\t-i runs repl\n\t-run used for shebang\n\t-p prints profile info at the end\n\t-v prints version string\n\n";
|
||||
<< "Usage:\n\t-h print this help\n\t-b skip stdlib loading\n\t-c code - runs code passed on command line\n\t-f source_file - executes code in file\n\t-i runs repl\n\t-run used for shebang\n\t-p prints profile info at the end\n\t-d better stacktrace when exception\n\t-v prints version string\n\n";
|
||||
return 0;
|
||||
}
|
||||
// version
|
||||
|
||||
Reference in New Issue
Block a user