mirror of
				https://github.com/scm-manager/scm-manager.git
				synced 2025-10-31 18:46:07 +01:00 
			
		
		
		
	Add context to InternalRepositoryException
This commit is contained in:
		| @@ -56,6 +56,8 @@ import sonia.scm.util.Util; | ||||
|  | ||||
| import java.io.File; | ||||
|  | ||||
| import static sonia.scm.ContextEntry.ContextBuilder.entity; | ||||
|  | ||||
| //~--- JDK imports ------------------------------------------------------------ | ||||
|  | ||||
| /** | ||||
| @@ -173,7 +175,8 @@ public class SvnRepositoryHandler | ||||
|     } | ||||
|     catch (SVNException ex) | ||||
|     { | ||||
|       throw new InternalRepositoryException(ex); | ||||
|       logger.error("could not create svn repository", ex); | ||||
|       throw new InternalRepositoryException(entity(repository), "could not create repository", ex); | ||||
|     } | ||||
|     finally | ||||
|     { | ||||
|   | ||||
| @@ -98,7 +98,7 @@ public class SvnBlameCommand extends AbstractSvnCommand implements BlameCommand | ||||
|     } | ||||
|     catch (SVNException ex) | ||||
|     { | ||||
|       throw new InternalRepositoryException("could not create blame result", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not create blame result", ex); | ||||
|     } | ||||
|  | ||||
|     return new BlameResult(blameLines.size(), blameLines); | ||||
|   | ||||
| @@ -137,7 +137,7 @@ public class SvnCatCommand extends AbstractSvnCommand implements CatCommand | ||||
|     } else if (SVNErrorCode.FS_NO_SUCH_REVISION.getCode() == svnErrorCode) { | ||||
|       throw notFound(entity("Revision", request.getRevision()).in(repository)); | ||||
|     } else { | ||||
|       throw new InternalRepositoryException("could not get content from revision", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not get content from revision", ex); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -157,7 +157,7 @@ public class SvnCatCommand extends AbstractSvnCommand implements CatCommand | ||||
|     } | ||||
|     catch (SVNException ex) | ||||
|     { | ||||
|       throw new InternalRepositoryException("could not get content from transaction", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not get content from transaction", ex); | ||||
|     } | ||||
|     finally | ||||
|     { | ||||
|   | ||||
| @@ -120,7 +120,7 @@ public class SvnDiffCommand extends AbstractSvnCommand implements DiffCommand | ||||
|     } | ||||
|     catch (SVNException ex) | ||||
|     { | ||||
|       throw new InternalRepositoryException("could not create diff", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not create diff", ex); | ||||
|     } | ||||
|     finally | ||||
|     { | ||||
|   | ||||
| @@ -97,7 +97,7 @@ public class SvnLogCommand extends AbstractSvnCommand implements LogCommand | ||||
|     } | ||||
|     catch (SVNException ex) | ||||
|     { | ||||
|       throw new InternalRepositoryException("could not open repository", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not open repository", ex); | ||||
|     } | ||||
|  | ||||
|     return changeset; | ||||
| @@ -139,7 +139,7 @@ public class SvnLogCommand extends AbstractSvnCommand implements LogCommand | ||||
|     } | ||||
|     catch (SVNException ex) | ||||
|     { | ||||
|       throw new InternalRepositoryException("could not open repository", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not open repository", ex); | ||||
|     } | ||||
|  | ||||
|     return changesets; | ||||
|   | ||||
| @@ -34,7 +34,7 @@ public class SvnModificationsCommand extends AbstractSvnCommand implements Modif | ||||
|         modifications = SvnUtil.createModifications(entries.iterator().next(), revision); | ||||
|       } | ||||
|     } catch (SVNException ex) { | ||||
|       throw new InternalRepositoryException("could not open repository", ex); | ||||
|       throw new InternalRepositoryException(repository, "could not open repository", ex); | ||||
|     } | ||||
|     return modifications; | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user