[catboost/app] add option --trigger-core-dump to reliably core dump on request;
[catboost/app] aborn in option handler
[catboost/app] add hidden command line option to trigger core dump
([arc::mergeid] f6910ef4-ab5ff390-666bcfa-a)
#include <util/generic/serialized_enum.h>
#include <util/string/join.h>
+#include <util/system/yassert.h>
using namespace NCB;
@@ -171,6 +172,13 @@ void ParseCommandLine(int argc, const char* argv[],
parser.AddHelpOption();
BindPoolLoadParams(&parser, params);
+ parser
+ .AddLongOption("trigger-core-dump")
+ .NoArgument()
+ .Handler0([] { Y_FAIL("Aboring on user request"); })
+ .Help("Trigger core dump")
+ .Hidden();
+
const auto allObjectives = GetAllObjectives();
const auto lossFunctionDescription = TString::Join(
"Should be one of: ",
