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

Method FromString

library/cpp/yt/misc/enum-inl.h:353–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351
352template <class T>
353constexpr T TEnumTraits<T, true>::FromString(TStringBuf literal)
354{
355 auto optionalValue = FindValueByLiteral(literal);
356 if (!optionalValue) {
357 throw ::NYT::TSimpleException(Sprintf("Error parsing %s value %s",
358 GetTypeName().data(),
359 TString(literal).Quote().c_str()).c_str());
360 }
361 return *optionalValue;
362}
363
364////////////////////////////////////////////////////////////////////////////////
365

Callers

nothing calls this directly

Calls 5

TSimpleExceptionClass · 0.85
SprintfFunction · 0.85
GetTypeNameFunction · 0.50
c_strMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected