#ifndef ENV_INL_H_ #error "Direct inclusion of this file is not allowed, include env.h" // For the sake of sane code completion. #include "env.h" #endif #include namespace NYT { //////////////////////////////////////////////////////////////////////////////// namespace NDetail { [[noreturn]] void ThrowFailedToParseEnvValueError(TStringBuf name, TStringBuf value); } // namespace NDetail template T GetEnvValueOrThrow(TStringBuf name) { auto value = GetEnvValueOrThrow(name); T result; if (!TryFromString(value, result)) { NDetail::ThrowFailedToParseEnvValueError(name, value); } return result; } //////////////////////////////////////////////////////////////////////////////// } // namespace NYT