fix unwrapping of exceptions

This commit is contained in:
kimchy 2010-07-01 10:27:53 +03:00
parent f6c9c49645
commit ad5525f575
1 changed files with 2 additions and 2 deletions

View File

@ -33,10 +33,10 @@ public final class ExceptionsHelper {
int counter = 0;
Throwable result = t;
while (result instanceof ElasticSearchWrapperException) {
if (t.getCause() == null) {
if (result.getCause() == null) {
return result;
}
if (t.getCause() == t) {
if (result.getCause() == result) {
return result;
}
if (counter++ > 10) {