Browse files

Merge pull request #435 from sbridges/issue-434

SocketTimeoutException translated as HectorTransportException, not HTimeoutException #434
  • Loading branch information...
2 parents db74f37 + fb76ae6 commit 549148e229391a4030449f0c9118f7d47cf990f6 @patricioe patricioe committed Mar 8, 2012
View
9 core/src/main/java/me/prettyprint/cassandra/service/ExceptionsTranslatorImpl.java
@@ -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) {

0 comments on commit 549148e

Please sign in to comment.