From f34f00a2796da13a5bd005eccf2a5aaab4977c34 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 23 Apr 2012 19:38:37 +0400 Subject: [PATCH] IDEA-85015 Better diagnostics. Don't hide the original exception. Supply the output if the revision can't be parsed. --- .../src/git4idea/changes/GitChangeUtils.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/plugins/git4idea/src/git4idea/changes/GitChangeUtils.java b/plugins/git4idea/src/git4idea/changes/GitChangeUtils.java index 731e9be9e63b..80ff6e9cb3dc 100644 --- a/plugins/git4idea/src/git4idea/changes/GitChangeUtils.java +++ b/plugins/git4idea/src/git4idea/changes/GitChangeUtils.java @@ -198,7 +198,7 @@ public class GitChangeUtils { String output = handler.run(); StringTokenizer stk = new StringTokenizer(output, "\n\r \t", false); if (!stk.hasMoreTokens()) { - throw new VcsException("The string '" + revisionNumber + "' does not represents a revision number."); + throw new VcsException("The string '" + revisionNumber + "' does not represents a revision number. Output: [" + output + "]"); } Date timestamp = GitUtil.parseTimestampWithNFEReport(stk.nextToken(), handler, output); return new GitRevisionNumber(stk.nextToken(), timestamp); @@ -236,18 +236,7 @@ public class GitChangeUtils { revisionName, "--"); String output = h.run(); StringScanner s = new StringScanner(output); - try { - return parseChangeList(project, root, s, skipDiffsForMerge, h); - } - catch (RuntimeException e) { - throw e; - } - catch (VcsException e) { - throw e; - } - catch (Exception e) { - throw new VcsException(e); - } + return parseChangeList(project, root, s, skipDiffsForMerge, h); } @Nullable