mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
improve exception handling
This commit is contained in:
@@ -33,6 +33,7 @@ package sonia.scm.repository.api;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
|
||||
@@ -41,6 +42,7 @@ import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.PermissionType;
|
||||
import sonia.scm.repository.PreProcessorUtil;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
import sonia.scm.repository.spi.IncomingCommand;
|
||||
import sonia.scm.repository.spi.IncomingCommandRequest;
|
||||
import sonia.scm.security.RepositoryPermission;
|
||||
@@ -82,7 +84,7 @@ public final class IncomingCommandBuilder
|
||||
* @return incoming changesets
|
||||
*/
|
||||
public ChangesetPagingResult getIncomingChangesets(
|
||||
Repository remoteRepository)
|
||||
Repository remoteRepository) throws IOException, RepositoryException
|
||||
{
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
package sonia.scm.repository.api;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import sonia.scm.cache.CacheManager;
|
||||
@@ -35,6 +36,7 @@ import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.PermissionType;
|
||||
import sonia.scm.repository.PreProcessorUtil;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
import sonia.scm.repository.spi.OutgoingCommand;
|
||||
import sonia.scm.repository.spi.OutgoingCommandRequest;
|
||||
import sonia.scm.security.RepositoryPermission;
|
||||
@@ -76,7 +78,7 @@ public final class OutgoingCommandBuilder
|
||||
* @return outgoing changesets
|
||||
*/
|
||||
public ChangesetPagingResult getOutgoingChangesets(
|
||||
Repository remoteRepository)
|
||||
Repository remoteRepository) throws IOException, RepositoryException
|
||||
{
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
|
||||
|
||||
@@ -34,6 +34,11 @@ package sonia.scm.repository.spi;
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -50,7 +55,11 @@ public interface IncomingCommand
|
||||
* @param request
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
public ChangesetPagingResult getIncomingChangesets(
|
||||
IncomingCommandRequest request);
|
||||
IncomingCommandRequest request)
|
||||
throws IOException, RepositoryException;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,11 @@ package sonia.scm.repository.spi;
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -50,7 +55,11 @@ public interface OutgoingCommand
|
||||
* @param request
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
public ChangesetPagingResult getOutgoingChangesets(
|
||||
OutgoingCommandRequest request);
|
||||
OutgoingCommandRequest request)
|
||||
throws IOException, RepositoryException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user