]> source.dussan.org Git - jgit.git/commitdiff
Improved creation of JGitInternalException 70/1370/1
authorChristian Halstrick <christian.halstrick@sap.com>
Mon, 23 Aug 2010 07:48:17 +0000 (09:48 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Mon, 23 Aug 2010 08:20:43 +0000 (10:20 +0200)
There where 3 cases where a JGitInternalExcption was created
without specifying the root cause. This has been fixed.

Change-Id: I2ee08d04732371cd9e30874b1437b61217770b6a
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java

index 859e92fdb7059f74de58fd95b0f6077b48896275..da6ac0a43447607c5373023e8cf178b0457e3832 100644 (file)
@@ -248,7 +248,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
                        } catch (IOException e) {
                                throw new JGitInternalException(MessageFormat.format(
                                                JGitText.get().exceptionOccuredDuringReadingOfGIT_DIR,
-                                               Constants.MERGE_HEAD, e));
+                                               Constants.MERGE_HEAD, e), e);
                        }
                        if (message == null) {
                                try {
@@ -256,7 +256,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
                                } catch (IOException e) {
                                        throw new JGitInternalException(MessageFormat.format(
                                                        JGitText.get().exceptionOccuredDuringReadingOfGIT_DIR,
-                                                       Constants.MERGE_MSG, e));
+                                                       Constants.MERGE_MSG, e), e);
                                }
                        }
                }
index a6e648d36081f3b9fd1ad77ac1683409666c5acd..f94f32fef9e41c4aca599c6be428ac91d94163a9 100644 (file)
@@ -164,7 +164,7 @@ public class MergeCommand extends GitCommand<MergeResult> {
                        throw new JGitInternalException(
                                        MessageFormat.format(
                                                        JGitText.get().exceptionCaughtDuringExecutionOfMergeCommand,
-                                                       e));
+                                                       e), e);
                }
        }