private void waitLastError(Request request) {
// ResponseFuture を取得
RequestFuture requestFuture = request.getFuture();
if (requestFuture != null) {
try {
Response response = requestFuture.get();
BSONObject object = response.getDocuments().get(0);
// OK でない場合は、例外を発する
if (!response.isOk()) {
String error = (String) object.get("errmsg");
throw new MongoException(error);
}
String err = (String) object.get("err");
if (err != null) {