com.basho.riak.client.raw
Class JSONErrorParser
java.lang.Object
com.basho.riak.client.raw.JSONErrorParser
public class JSONErrorParser
- extends Object
Exceptions come back from Riak as JSON, parses exceptions, and throws the
most specific exception it can.
- Author:
- russell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONErrorParser
public JSONErrorParser()
parseException
public static RiakException parseException(String json)
- Parses some Riak error
json
into a checked exception of the
most specific type it can manage.
- Parameters:
json
- The error from Riak
- Returns:
- a
RiakException
as specific as possible
- Throws:
IOException
isTimeoutException
public static boolean isTimeoutException(String json)
- Does the
json
represent a riak map/reduce timeout exception?
- Parameters:
json
- an error String from Riak
- Returns:
- true if
json
represents an m/r timeout, false
otherwse
- Throws:
IOException
Copyright © 2012. All Rights Reserved.