DATACASS-262 - Add missing throws to catch blocks in CqlTemplate.

While these process methods have quite a few problems and inconsistencies with respect to the exception handling, only the more egregious 'throw' omissions are addressed in this commit.

Original pull request: #42.
This commit is contained in:
Ryan Scheidter
2015-10-06 14:12:34 -05:00
committed by Mark Paluch
parent 71a1ba5255
commit 5dc5cc5196

View File

@@ -756,7 +756,7 @@ public class CqlTemplate extends CassandraAccessor implements CqlOperations {
rch.processRow(row);
}
} catch (DriverException dx) {
translateExceptionIfPossible(dx);
throw translateExceptionIfPossible(dx);
}
}
@@ -769,7 +769,7 @@ public class CqlTemplate extends CassandraAccessor implements CqlOperations {
mappedRows.add(rowMapper.mapRow(row, i++));
}
} catch (DriverException dx) {
translateExceptionIfPossible(dx);
throw translateExceptionIfPossible(dx);
}
return mappedRows;
}
@@ -784,7 +784,7 @@ public class CqlTemplate extends CassandraAccessor implements CqlOperations {
Assert.isTrue(rows.size() == 1, "row list has " + rows.size() + " rows instead of one");
row = rowMapper.mapRow(rows.get(0), 0);
} catch (DriverException dx) {
translateExceptionIfPossible(dx);
throw translateExceptionIfPossible(dx);
}
return row;
}