Convert most ChangeApi handlers to retrying wrappers
Excludes a few that will require more work to plumb the BatchUpdate.Factory into the class that actually does the work. Change-Id: Id8c679c91ed8ea142f1856fcc2d976c4fb609dc5
This commit is contained in:
		@@ -14,17 +14,14 @@
 | 
			
		||||
 | 
			
		||||
package com.google.gerrit.sshd.commands;
 | 
			
		||||
 | 
			
		||||
import com.google.gerrit.extensions.restapi.RestApiException;
 | 
			
		||||
import com.google.gerrit.reviewdb.client.Change;
 | 
			
		||||
import com.google.gerrit.server.change.ChangeResource;
 | 
			
		||||
import com.google.gerrit.server.change.Index;
 | 
			
		||||
import com.google.gerrit.server.permissions.PermissionBackendException;
 | 
			
		||||
import com.google.gerrit.sshd.ChangeArgumentParser;
 | 
			
		||||
import com.google.gerrit.sshd.CommandMetaData;
 | 
			
		||||
import com.google.gerrit.sshd.SshCommand;
 | 
			
		||||
import com.google.gwtorm.server.OrmException;
 | 
			
		||||
import com.google.inject.Inject;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.util.LinkedHashMap;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import org.kohsuke.args4j.Argument;
 | 
			
		||||
@@ -58,7 +55,7 @@ final class IndexChangesCommand extends SshCommand {
 | 
			
		||||
    for (ChangeResource rsrc : changes.values()) {
 | 
			
		||||
      try {
 | 
			
		||||
        index.apply(rsrc, new Index.Input());
 | 
			
		||||
      } catch (IOException | RestApiException | OrmException | PermissionBackendException e) {
 | 
			
		||||
      } catch (Exception e) {
 | 
			
		||||
        ok = false;
 | 
			
		||||
        writeError(
 | 
			
		||||
            "error", String.format("failed to index change %s: %s", rsrc.getId(), e.getMessage()));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user