Author: bryanduxbury
Date: Thu Sep 2 00:24:50 2010
New Revision: 991778
URL: http://svn.apache.org/viewvc?rev=991778&view=rev
Log:
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
Modified:
incubator/thrift/trunk/lib/perl/lib/Thrift/Protocol.pm
Modified: incubator/thrift/trunk/lib/perl/lib/Thrift/Protocol.pm
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/perl/lib/Thrift/Protocol.pm?rev=991778&r1=991777&r2=991778&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/perl/lib/Thrift/Protocol.pm (original)
+++ incubator/thrift/trunk/lib/perl/lib/Thrift/Protocol.pm Thu Sep 2 00:24:50
2010
@@ -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?");
}
#