blob: 44b19875efb1e1b0bedd2a3adf98c4a95c8f68fd [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#include <fidl/test.protocols/cpp/common_types.h>
namespace test_protocols {
extern "C" const fidl_type_t test_protocols_ErrorEnumTable;
} // namespace test_protocols
size_t fidl::internal::DisplayError<::test_protocols::ErrorEnum>::Format(
const ::test_protocols::ErrorEnum& value, char* destination,
size_t capacity) {
const char* name = [&]() -> const char* {
switch (static_cast<uint32_t>(value)) {
case 1u:
return "ERR_FOO";
case 2u:
return "ERR_BAR";
default:
return nullptr;
}
}();
return ::fidl::internal::FormatApplicationError(
static_cast<uint32_t>(value), name,
&::test_protocols::test_protocols_ErrorEnumTable, destination, capacity);
}