1#include <userver/proto-structs/time_of_day.hpp>
5#include <userver/proto-structs/exceptions.hpp>
6#include <userver/utils/impl/internal_tag.hpp>
10namespace proto_structs {
13 ::utils::impl::InternalTag,
20 std::chrono::hours{hours},
21 std::chrono::minutes{minutes},
22 std::chrono::seconds{seconds},
23 std::chrono::nanoseconds{nanos}
26void TimeOfDay::ThrowError(
27 const std::chrono::hours& hours,
28 const std::chrono::minutes& minutes,
29 const std::chrono::seconds& seconds,
30 const std::chrono::nanoseconds& nanos
32 throw ValueError(fmt::format(
33 "Time of the day '{}:{}:{}.{}ns' is invalid or out of range",
41void TimeOfDay::ThrowError(
const char* reason) {
throw ValueError(reason); }