From: Bryan Duxbury Date: Thu, 2 Sep 2010 00:24:50 +0000 (+0000) Subject: THRIFT-840. perl: Perl protocol handler could be more robust against unrecognised... X-Git-Tag: 0.5.0~79 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=a55f51d8709582e1d054844c17c554e8d124b394;p=common%2Fthrift.git THRIFT-840. perl: Perl protocol handler could be more robust against unrecognised types This patch causes the protocol to throw an exception when it sees an unrecognized type instead of silently doing nothing. Patch: Conrad Hughes git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991778 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/perl/lib/Thrift/Protocol.pm b/lib/perl/lib/Thrift/Protocol.pm index 034711f3..e2801fee 100644 --- a/lib/perl/lib/Thrift/Protocol.pm +++ b/lib/perl/lib/Thrift/Protocol.pm @@ -399,8 +399,7 @@ sub skip return $result; } - - return 0; + die new Thrift::TException("Type $type not recognised --- corrupt data?"); } @@ -511,8 +510,7 @@ sub skipBinary return $result; } - return 0; - + die new Thrift::TException("Type $type not recognised --- corrupt data?"); } #