Skip to content

Commit b22f90d

Browse files
author
Greg Whalin
committed
catch more exceptions safely
1 parent 6a7fb63 commit b22f90d

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/com/meetup/memcached/MemcachedClient.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,26 +1377,12 @@ public Object get( String key, Integer hashCode, boolean asString ) {
13771377
if ( log.isInfoEnabled() )
13781378
log.info( "++++ deserializing " + o.getClass() );
13791379
}
1380-
catch ( InvalidClassException e ) {
1381-
/* Errors de-serializing are to be expected in the case of a
1382-
* long running server that spans client restarts with updated
1383-
* classes.
1384-
*/
1385-
// if we have an errorHandler, use its hook
1386-
if ( errorHandler != null )
1387-
errorHandler.handleErrorOnGet( this, e, key );
1388-
1389-
o = null;
1390-
log.error( "++++ InvalidClassException thrown while trying to deserialize for key: " + key + " -- " + e.getMessage() );
1391-
}
1392-
catch ( ClassNotFoundException e ) {
1393-
1394-
// if we have an errorHandler, use its hook
1380+
catch ( Exception e ) {
13951381
if ( errorHandler != null )
13961382
errorHandler.handleErrorOnGet( this, e, key );
13971383

13981384
o = null;
1399-
log.error( "++++ ClassNotFoundException thrown while trying to deserialize for key: " + key + " -- " + e.getMessage() );
1385+
log.error( "++++ Exception thrown while trying to deserialize for key: " + key + " -- " + e.getMessage() );
14001386
}
14011387
}
14021388
}

0 commit comments

Comments
 (0)