Add default to function generating name of Transport Error Code Function converting TransportErrorCode from a number to a string did not have a default statement. If the error code was not one of the predefined ones, this would cause a test failure. This CL adds a proper default: clause. gfe-relnote: N/A test/V99/IETF-QUIC code only. PiperOrigin-RevId: 264136976 Change-Id: I7aa7b6d3615d4b12e7de03ca913fb23a989b0734
diff --git a/quic/core/quic_types.cc b/quic/core/quic_types.cc index 2fe951b..a8b8db9 100644 --- a/quic/core/quic_types.cc +++ b/quic/core/quic_types.cc
@@ -99,7 +99,8 @@ RETURN_STRING_LITERAL(VERSION_NEGOTIATION_ERROR); RETURN_STRING_LITERAL(PROTOCOL_VIOLATION); RETURN_STRING_LITERAL(INVALID_MIGRATION); - // No default -- compiler will catch any adds/changes then. + default: + return QuicStrCat("Unknown Transport Error Code Value: ", c); } }