Skip to content

Commit

Permalink
Use InfrastructureException
Browse files Browse the repository at this point in the history
Signed-off-by: David Kwon <dakwon@redhat.com>
  • Loading branch information
dkwon17 committed Jun 1, 2021
1 parent 49ed330 commit f016079
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ private void deleteCommonPVC(Workspace workspace) throws InfrastructureException
}

/**
* @return true, if a given user has no workspaces, false otherwise (or if the subject is
* anonymous)
* @throws RuntimeException
* @return true, if a given user has no workspaces, false otherwise
*
* @throws InfrastructureException
*/
private boolean userHasNoWorkspaces() {
private boolean userHasNoWorkspaces() throws InfrastructureException {
Subject subject = EnvironmentContext.getCurrent().getSubject();
String userId = subject.getUserId();
try {
Expand All @@ -293,7 +293,7 @@ private boolean userHasNoWorkspaces() {
}
} catch (ServerException e) {
// should never happen
throw new RuntimeException(e.getLocalizedMessage(), e);
throw new InfrastructureException(e.getLocalizedMessage(), e);
}
return false;
}
Expand Down

0 comments on commit f016079

Please sign in to comment.