| 351 | |
| 352 | template <class T> |
| 353 | constexpr 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 |
nothing calls this directly
no test coverage detected