Fix unreported exception PermissionBackendException; must be caught or declared to be thrown Change-Id: Icd61ced1951e8bdc3737b7dfdfe1abeb133ffb00
diff --git a/src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowAccountCommand.java b/src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowAccountCommand.java index 5c439ff..aba4b67 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowAccountCommand.java +++ b/src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowAccountCommand.java
@@ -32,6 +32,7 @@ import com.google.gerrit.sshd.CommandMetaData; import com.google.gerrit.sshd.SshCommand; import com.google.gwtorm.server.OrmException; +import com.google.gerrit.server.permissions.PermissionBackendException; import com.google.gwtorm.server.SchemaFactory; import com.google.inject.Inject; import com.google.inject.Provider; @@ -135,7 +136,7 @@ try { sshKeys = getSshKeys.get() .apply(new AccountResource(userFactory.create(id))); - } catch (AuthException | IOException | ConfigInvalidException e) { + } catch (AuthException | IOException | ConfigInvalidException | PermissionBackendException e) { throw new UnloggedFailure(1, "Error getting sshkeys: " + e.getMessage(), e); } if (sshKeys == null || sshKeys.isEmpty()) {