Don't throw generic Exception from diff preferences REST endpoints

Change-Id: I3971f80bcf05e6477117cfe086bedbd3f0f8706e
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-06-03 13:43:15 +02:00
parent a8becd7b0d
commit d565142e2d
2 changed files with 3 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ public class GetDiffPreferences implements RestReadView<ConfigResource> {
@Override
public DiffPreferencesInfo apply(ConfigResource configResource)
throws BadRequestException, ResourceConflictException, Exception {
throws BadRequestException, ResourceConflictException, IOException,
ConfigInvalidException {
return readFromGit(gitManager, allUsersName, null);
}

View File

@@ -61,7 +61,7 @@ public class SetDiffPreferences implements
@Override
public Object apply(ConfigResource configResource, DiffPreferencesInfo in)
throws BadRequestException, Exception {
throws BadRequestException, IOException, ConfigInvalidException {
if (in == null) {
throw new BadRequestException("input must be provided");
}