Mercurial > jhg
diff cmdline/org/tmatesoft/hg/console/Bundle.java @ 423:9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 23 Mar 2012 22:51:18 +0100 |
parents | dfb8405d996f |
children | 6526d8adbc0f |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Bundle.java Fri Mar 23 21:26:01 2012 +0100 +++ b/cmdline/org/tmatesoft/hg/console/Bundle.java Fri Mar 23 22:51:18 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 TMate Software Ltd + * Copyright (c) 2011-2012 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,6 @@ import java.util.Collections; import java.util.LinkedList; -import org.tmatesoft.hg.core.HgCallbackTargetException; import org.tmatesoft.hg.core.HgException; import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.repo.HgBundle; @@ -62,16 +61,12 @@ private final HgChangelog changelog = hgRepo.getChangelog(); public void next(int revisionNumber, Nodeid nodeid, RawChangeset cset) { - try { - if (changelog.isKnown(nodeid)) { - System.out.print("+"); - } else { - System.out.print("-"); - } - System.out.printf("%d:%s\n%s\n", revisionNumber, nodeid.shortNotation(), cset.toString()); - } catch (HgException ex) { - throw new HgCallbackTargetException.Wrap(ex); + if (changelog.isKnown(nodeid)) { + System.out.print("+"); + } else { + System.out.print("-"); } + System.out.printf("%d:%s\n%s\n", revisionNumber, nodeid.shortNotation(), cset.toString()); } }); }