THRIFT-4024, THRIFT-4783: throw when skipping invalid type (#1742)
* THRIFT-4024: make c_glib throw on unsupported type when skipping
* THRIFT-4783: throw on invalid skip (py)
* THRIFT-4024: make cpp throw on unsupported type when skipping
* THRIFT-4024: uniform skip behavior on unsupported type
diff --git a/lib/swift/Sources/TProtocol.swift b/lib/swift/Sources/TProtocol.swift
index a4e4a20..b111e71 100644
--- a/lib/swift/Sources/TProtocol.swift
+++ b/lib/swift/Sources/TProtocol.swift
@@ -175,8 +175,9 @@
try skip(type: elemType)
}
try readListEnd()
+
default:
- return
+ throw TProtocolError(error: .invalidData, message: "Invalid data")
}
}
}