Ignore parsed MessageContent of unknown type.
This commit is contained in:
parent
4dc1bd4988
commit
b04eeb4d87
@ -1870,7 +1870,7 @@ static void parse(unique_ptr<MessageContent> &content, ParserT &parser) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG(FATAL) << "Have unknown message content type " << static_cast<int32>(content_type);
|
||||
is_bad = true;
|
||||
}
|
||||
if (is_bad) {
|
||||
LOG(ERROR) << "Load a message with an invalid content of type " << content_type;
|
||||
|
@ -127,8 +127,7 @@ StringBuilder &operator<<(StringBuilder &string_builder, MessageContentType cont
|
||||
case MessageContentType::Story:
|
||||
return string_builder << "Story";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string_builder;
|
||||
return string_builder << "Invalid type " << static_cast<int32>(content_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,6 @@ static void parse(unique_ptr<StoryContent> &content, ParserT &parser) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG(ERROR) << "Have unknown story content type " << static_cast<int32>(content_type);
|
||||
is_bad = true;
|
||||
}
|
||||
if (is_bad) {
|
||||
|
@ -17,8 +17,7 @@ StringBuilder &operator<<(StringBuilder &string_builder, StoryContentType conten
|
||||
case StoryContentType::Unsupported:
|
||||
return string_builder << "Unsupported";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string_builder;
|
||||
return string_builder << "Invalid type " << static_cast<int32>(content_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user