MCPcopy Create free account
hub / github.com/catboost/catboost / Get

Method Get

library/cpp/getopt/small/last_getopt_parse_result.cpp:78–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 const char* TOptsParseResult::Get(const TOpt* opt, bool includeDefault) const {
79 Y_ASSERT(opt);
80 const TOptParseResult* r = FindOptParseResult(opt, includeDefault);
81 if (!r || r->Empty()) {
82 try {
83 throw TUsageException() << "option " << opt->ToShortString() << " is unspecified";
84 } catch (...) {
85 HandleError();
86 // unreachable
87 throw;
88 }
89 } else {
90 return r->Back();
91 }
92 }
93
94 const char* TOptsParseResult::GetOrElse(const TOpt* opt, const char* defaultValue) const {
95 Y_ASSERT(opt);

Callers 1

HandleErrorMethod · 0.45

Calls 5

TUsageExceptionClass · 0.85
ToShortStringMethod · 0.80
GetFunction · 0.50
EmptyMethod · 0.45
BackMethod · 0.45

Tested by

no test coverage detected