aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/exception/attributes.h
blob: c1a88bb82067f04db263be880c11ffa5b5bd9b8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include <library/cpp/yt/misc/guid.h>

#include <util/generic/string.h>

#include <variant>

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

struct TExceptionAttribute
{
    using TKey = TString;
    using TValue = std::variant<i64, double, bool, TString>;

    template <class T>
    TExceptionAttribute(const TKey& key, const T& value)
        : Key(key)
        , Value(value)
    { }

    TKey Key;
    TValue Value;
};

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT