handle IOException of changesetviewer

This commit is contained in:
Sebastian Sdorra
2011-09-29 14:14:51 +02:00
parent 389a25924e
commit 7efb7d2e6b
2 changed files with 6 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ package sonia.scm.repository;
import com.google.inject.Inject; import com.google.inject.Inject;
import java.io.IOException;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -107,7 +108,7 @@ public class ChangesetViewerUtil extends CacheClearHook
*/ */
public ChangesetPagingResult getChangesets(String repositoryId, int start, public ChangesetPagingResult getChangesets(String repositoryId, int start,
int max) int max)
throws RepositoryException, NotSupportedFeatuerException throws IOException, RepositoryException, NotSupportedFeatuerException
{ {
AssertUtil.assertIsNotEmpty(repositoryId); AssertUtil.assertIsNotEmpty(repositoryId);
@@ -137,7 +138,7 @@ public class ChangesetViewerUtil extends CacheClearHook
*/ */
public ChangesetPagingResult getChangesets(Repository repository, int start, public ChangesetPagingResult getChangesets(Repository repository, int start,
int max) int max)
throws RepositoryException, NotSupportedFeatuerException throws IOException, RepositoryException, NotSupportedFeatuerException
{ {
AssertUtil.assertIsNotNull(repository); AssertUtil.assertIsNotNull(repository);

View File

@@ -245,6 +245,8 @@ public class RepositoryResource
* *
* @return * @return
* *
*
* @throws IOException
* @throws RepositoryException * @throws RepositoryException
*/ */
@GET @GET
@@ -252,7 +254,7 @@ public class RepositoryResource
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response getChangesets(@PathParam("id") String id, @DefaultValue("0") public Response getChangesets(@PathParam("id") String id, @DefaultValue("0")
@QueryParam("start") int start, @DefaultValue("20") @QueryParam("start") int start, @DefaultValue("20")
@QueryParam("limit") int limit) throws RepositoryException @QueryParam("limit") int limit) throws RepositoryException, IOException
{ {
Response response = null; Response response = null;