Permalink
Browse files

catch more exceptions safely

  • Loading branch information...
1 parent 6a7fb63 commit b22f90dd33ccf80a4e64a9157061be2b44498761 Greg Whalin committed Aug 31, 2010
Showing with 2 additions and 16 deletions.
  1. +2 −16 src/com/meetup/memcached/MemcachedClient.java
@@ -1377,26 +1377,12 @@ public Object get( String key, Integer hashCode, boolean asString ) {
if ( log.isInfoEnabled() )
log.info( "++++ deserializing " + o.getClass() );
}
- catch ( InvalidClassException e ) {
- /* Errors de-serializing are to be expected in the case of a
- * long running server that spans client restarts with updated
- * classes.
- */
- // if we have an errorHandler, use its hook
- if ( errorHandler != null )
- errorHandler.handleErrorOnGet( this, e, key );
-
- o = null;
- log.error( "++++ InvalidClassException thrown while trying to deserialize for key: " + key + " -- " + e.getMessage() );
- }
- catch ( ClassNotFoundException e ) {
-
- // if we have an errorHandler, use its hook
+ catch ( Exception e ) {
if ( errorHandler != null )
errorHandler.handleErrorOnGet( this, e, key );
o = null;
- log.error( "++++ ClassNotFoundException thrown while trying to deserialize for key: " + key + " -- " + e.getMessage() );
+ log.error( "++++ Exception thrown while trying to deserialize for key: " + key + " -- " + e.getMessage() );
}
}
}

0 comments on commit b22f90d

Please sign in to comment.