# ErrorHandler
Date: 2012-02-24

## com.google.appengine.api.memcache
Interface ErrorHandler

All Known Subinterfaces:
  ConsistentErrorHandler

All Known Implementing Classes:
  LogAndContinueErrorHandler, StrictErrorHandler

Deprecated. Use `ConsistentErrorHandler` instead

    @Deprecated
    public interface ErrorHandler

Handles errors raised by the `MemcacheService`, registered with `BaseMemcacheService.setErrorHandler(ErrorHandler)`. The default error handler is an instance of `LogAndContinueErrorHandler`. In most cases this will log the underlying error condition, but emulate cache-miss behavior in response rather than surfacing the problem to calling code. A less permissive alternative is `StrictErrorHandler`, which will instead throw a `MemcacheServiceException` to expose any errors for application code to resolve. To guarantee that all `MemcacheServiceException` are directed to the error handler use `ConsistentErrorHandler` instead.

Method Summary
`void` `handleDeserializationError(InvalidValueException ivx)` Deprecated. Handles deserialization errors.
`void` `handleServiceError(MemcacheServiceException ex)` Deprecated. Handles back-end service errors.

Method Detail

### handleDeserializationError

    void handleDeserializationError(InvalidValueException ivx)

  Deprecated.
  Handles deserialization errors. This method is called from either of the `get` methods, if the retrieved value cannot be deserialized. This normally indicates an application upgrade since the cache entry was stored, and should thus be treated as a cache miss, which is the behavior of `LogAndContinueErrorHandler` (the default).

### handleServiceError

    void handleServiceError(MemcacheServiceException ex)

  Deprecated.
  Handles back-end service errors. This method is called from most of the `MemcacheService` methods in the event of a service error. The handler may throw any `RuntimeException`, or it may simply return for "permissive" error handling, which will generally emulate behavior of a cache miss due to a discarded entry.

  Parameters:
    `ex` - the service error exception