Skip to content

Commit

Permalink
SocketTimeoutException translated as HectorTransportException, not HT…
Browse files Browse the repository at this point in the history
…imeoutException hector-client#434
  • Loading branch information
sbridges committed Mar 8, 2012
1 parent db74f37 commit fb76ae6
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ public HectorException translate(Throwable original) {
} else if (original instanceof TApplicationException) {
return new HCassandraInternalException(((TApplicationException)original).getType(), original.getMessage());
} else if (original instanceof TTransportException) {
// if the underlying cause is a scoket timeout, reflect that directly
// TODO this may be an issue on the Cassandra side which warrants ivestigation.
// I seem to remember these coming back as TimedOutException previously
if ( ((TTransportException)original).getCause() instanceof SocketTimeoutException ) {
return new HTimedOutException(original);
} else {
return new HectorTransportException(original);
}
return new HectorTransportException(original);
} else if (original instanceof org.apache.cassandra.thrift.TimedOutException) {
return new HTimedOutException(original);
} else if (original instanceof org.apache.cassandra.thrift.InvalidRequestException) {
Expand Down

0 comments on commit fb76ae6

Please sign in to comment.