Browse Source

Improved creation of JGitInternalException

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>
stable-0.9
Christian Halstrick 14 years ago
parent
commit
5fc990130b
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
  2. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java

4
org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java

@ -248,7 +248,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
} catch (IOException e) { } catch (IOException e) {
throw new JGitInternalException(MessageFormat.format( throw new JGitInternalException(MessageFormat.format(
JGitText.get().exceptionOccuredDuringReadingOfGIT_DIR, JGitText.get().exceptionOccuredDuringReadingOfGIT_DIR,
Constants.MERGE_HEAD, e)); Constants.MERGE_HEAD, e), e);
} }
if (message == null) { if (message == null) {
try { try {
@ -256,7 +256,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
} catch (IOException e) { } catch (IOException e) {
throw new JGitInternalException(MessageFormat.format( throw new JGitInternalException(MessageFormat.format(
JGitText.get().exceptionOccuredDuringReadingOfGIT_DIR, JGitText.get().exceptionOccuredDuringReadingOfGIT_DIR,
Constants.MERGE_MSG, e)); Constants.MERGE_MSG, e), e);
} }
} }
} }

2
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java

@ -164,7 +164,7 @@ public class MergeCommand extends GitCommand<MergeResult> {
throw new JGitInternalException( throw new JGitInternalException(
MessageFormat.format( MessageFormat.format(
JGitText.get().exceptionCaughtDuringExecutionOfMergeCommand, JGitText.get().exceptionCaughtDuringExecutionOfMergeCommand,
e)); e), e);
} }
} }

Loading…
Cancel
Save