@@ -1291,24 +1291,30 @@ protected Object decode(final ChannelHandlerContext ctx,
1291
1291
}
1292
1292
1293
1293
final Object decoded ;
1294
- if (server_version >= SERVER_VERSION_095_OR_ABOVE ) {
1295
- if (header .hasException ()) {
1296
- decoded = decodeException (rpc , header .getException ());
1297
- } else {
1298
- final int cell_size ;
1299
- {
1300
- final RPCPB .CellBlockMeta cellblock = header .getCellBlockMeta ();
1301
- if (cellblock == null ) {
1302
- cell_size = 0 ;
1303
- } else {
1304
- cell_size = cellblock .getLength ();
1305
- HBaseRpc .checkArrayLength (buf , cell_size );
1294
+ try {
1295
+ if (server_version >= SERVER_VERSION_095_OR_ABOVE ) {
1296
+ if (header .hasException ()) {
1297
+ decoded = decodeException (rpc , header .getException ());
1298
+ } else {
1299
+ final int cell_size ;
1300
+ {
1301
+ final RPCPB .CellBlockMeta cellblock = header .getCellBlockMeta ();
1302
+ if (cellblock == null ) {
1303
+ cell_size = 0 ;
1304
+ } else {
1305
+ cell_size = cellblock .getLength ();
1306
+ HBaseRpc .checkArrayLength (buf , cell_size );
1307
+ }
1306
1308
}
1309
+ decoded = rpc .deserialize (buf , cell_size );
1307
1310
}
1308
- decoded = rpc .deserialize (buf , cell_size );
1311
+ } else { // HBase 0.94 and before.
1312
+ decoded = deserialize (buf , rpc );
1309
1313
}
1310
- } else { // HBase 0.94 and before.
1311
- decoded = deserialize (buf , rpc );
1314
+ } catch (RuntimeException e ) {
1315
+ LOG .error ("Uncaught error during de-serialization of " + rpc
1316
+ + ", rpcid=" + rpcid );
1317
+ throw e ;
1312
1318
}
1313
1319
1314
1320
if (LOG .isDebugEnabled ()) {
0 commit comments