com.basho.riak.client.http.response
Interface RiakExceptionHandler

All Known Implementing Classes:
ConvertToCheckedExceptions

public interface RiakExceptionHandler

Allows clients to handle exceptions in a separate class rather than inline with the requests. If an RiakExceptionHandler is installed (use the client's setExceptionHandler() method), then exceptions RiakIOExceptions and RiakResponseExceptions will be passed to the handler rather than being thrown. If exceptions can be handled centrally by the caller, using an exception handler can result in cleaner code by avoiding repeated try/catch blocks for every operation.


Method Summary
 void handle(RiakIORuntimeException e)
          Handle exceptions caused by communication errors with the sever
 void handle(RiakResponseRuntimeException e)
          Handle exceptions caused by malformed responses from the sever
 

Method Detail

handle

void handle(RiakIORuntimeException e)
Handle exceptions caused by communication errors with the sever


handle

void handle(RiakResponseRuntimeException e)
Handle exceptions caused by malformed responses from the sever



Copyright © 2012. All Rights Reserved.