Implemented Database.getLastError and return error in Collection.ensureIndex.