aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/enum_cast.cpp
blob: 8db625ef440a432d9bcb39ba14db434ee9ed75ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include "enum_cast.h"

#include <util/generic/yexception.h>
#include <util/system/type_name.h>

namespace NPrivate {

    [[noreturn]] void OnSafeCastToEnumUnexpectedValue(const std::type_info& valueTypeInfo) {
        ythrow TBadCastException() << "Unexpected enum " << TypeName(valueTypeInfo) << " value";
    }

} // namespace NPrivate