Skip to content

Commit

Permalink
#263: Removed unnecessary exception throw
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzreyes committed Aug 14, 2019
1 parent 914993d commit 589bd40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion restapi/src/main/java/org/cristalise/restapi/ItemRoot.java
Expand Up @@ -174,7 +174,7 @@ else if ((script = getAggregateScript(type, scriptVersion)) != null) {
else if (item.checkViewpoint(type, view)) {
try {
return getViewpointOutcome(uuid, type, view, true).cookie(checkAndCreateNewCookie(authData)).build();
} catch ( Exception e ) {
} catch ( InvalidItemPathException | ObjectNotFoundException | PersistencyException e ) {
throw new WebAppExceptionBuilder().exception(e).newCookie(checkAndCreateNewCookie(authData)).build();
}
}
Expand Down
Expand Up @@ -147,7 +147,7 @@ protected static ItemProxy getProxy(String uuid) throws InvalidItemPathException
}

public Response.ResponseBuilder getViewpointOutcome(String uuid, String schema, String viewName, boolean json)
throws InvalidItemPathException, ObjectNotFoundException, Exception
throws InvalidItemPathException, ObjectNotFoundException, PersistencyException
{
ItemProxy item = ItemRoot.getProxy(uuid);
try {
Expand Down
Expand Up @@ -109,7 +109,7 @@ public Response queryJSONData(@PathParam("uuid") String uuid,

try {
return getViewpointOutcome(uuid, schema, viewName, true).cookie(checkAndCreateNewCookie( authData )).build();
} catch ( Exception e ) {
} catch ( PersistencyException | InvalidItemPathException | ObjectNotFoundException e ) {
throw new WebAppExceptionBuilder().exception(e).newCookie(checkAndCreateNewCookie( authData )).build();
}
}
Expand Down

0 comments on commit 589bd40

Please sign in to comment.