private abstract class ErrorCheckingDBConversation extends DBConversation<T> {
@Override
public final T execute(Connection connection) {
T value = doExecuteWithErrorChecking(connection);
Map<String, Object> message = executeCommand(new LastError(), connection);
if (message.get("err") != null) {
throw MongoException.forResponse(message);
}
return value;
}