diff --git a/modules/serdes/include/hephaestus/serdes/protobuf/enums.h b/modules/serdes/include/hephaestus/serdes/protobuf/enums.h index dc61a623..15dcafee 100644 --- a/modules/serdes/include/hephaestus/serdes/protobuf/enums.h +++ b/modules/serdes/include/hephaestus/serdes/protobuf/enums.h @@ -61,10 +61,11 @@ template fmt::format("{}_{}", proto_prefix, magic_enum::enum_name(e)); // ClassName_EnumName_ENUM_VALUE auto proto_enum = magic_enum::enum_cast(proto_enum_name); - heph::throwExceptionIf( - !proto_enum.has_value(), - fmt::format("The proto enum does not contain the requested key {}. Proto enum keys are\n{}", - proto_enum_name, utils::format::toString(magic_enum::enum_names()))); + if (!proto_enum.has_value()) { + heph::throwException( + fmt::format("The proto enum does not contain the requested key {}. Proto enum keys are\n{}", + proto_enum_name, utils::format::toString(magic_enum::enum_names()))); + } return proto_enum.value(); } diff --git a/modules/types_proto/src/dummy_type.cpp b/modules/types_proto/src/dummy_type.cpp index d9918eb1..3aadcbbd 100644 --- a/modules/types_proto/src/dummy_type.cpp +++ b/modules/types_proto/src/dummy_type.cpp @@ -7,9 +7,6 @@ #include #include -#include -#include - #include "hephaestus/serdes/protobuf/enums.h" #include "hephaestus/types/dummy_type.h" #include "hephaestus/types/proto/dummy_type.pb.h"