diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java index b1be128db1..9ae56e4eaf 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java @@ -96,8 +96,10 @@ public class RevCommitHandler extends OptionHandler<RevCommit> { final int dot2 = name.indexOf(".."); //$NON-NLS-1$ if (dot2 != -1) { if (!option.isMultiValued()) - throw new CmdLineException(MessageFormat.format(CLIText.get().onlyOneMetaVarExpectedIn - , option.metaVar(), name)); + throw new CmdLineException(clp, + MessageFormat.format( + CLIText.get().onlyOneMetaVarExpectedIn, + option.metaVar(), name)); final String left = name.substring(0, dot2); final String right = name.substring(dot2 + 2); @@ -116,20 +118,20 @@ public class RevCommitHandler extends OptionHandler<RevCommit> { try { id = clp.getRepository().resolve(name); } catch (IOException e) { - throw new CmdLineException(e.getMessage()); + throw new CmdLineException(clp, e.getMessage()); } if (id == null) - throw new CmdLineException(MessageFormat.format(CLIText.get().notACommit, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notACommit, name)); final RevCommit c; try { c = clp.getRevWalk().parseCommit(id); } catch (MissingObjectException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notACommit, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notACommit, name)); } catch (IncorrectObjectTypeException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notACommit, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notACommit, name)); } catch (IOException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); } if (interesting) |