Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 396:0ae53c32ecef
Straighten out exceptions thrown when file access failed - three is too much
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 23 Feb 2012 01:06:24 +0100 |
parents | b015f3918120 |
children | 2747b0723867 |
comparison
equal
deleted
inserted
replaced
395:4732fffff58a | 396:0ae53c32ecef |
---|---|
23 import java.util.ArrayList; | 23 import java.util.ArrayList; |
24 import java.util.Collections; | 24 import java.util.Collections; |
25 import java.util.HashMap; | 25 import java.util.HashMap; |
26 import java.util.List; | 26 import java.util.List; |
27 | 27 |
28 import org.tmatesoft.hg.core.HgDataStreamException; | 28 import org.tmatesoft.hg.core.HgException; |
29 import org.tmatesoft.hg.core.HgInvalidControlFileException; | 29 import org.tmatesoft.hg.core.HgInvalidControlFileException; |
30 import org.tmatesoft.hg.core.Nodeid; | 30 import org.tmatesoft.hg.core.Nodeid; |
31 import org.tmatesoft.hg.core.SessionContext; | 31 import org.tmatesoft.hg.core.SessionContext; |
32 import org.tmatesoft.hg.internal.ByteArrayChannel; | 32 import org.tmatesoft.hg.internal.ByteArrayChannel; |
33 import org.tmatesoft.hg.internal.ConfigFile; | 33 import org.tmatesoft.hg.internal.ConfigFile; |
162 final String content = new String(sink.toArray(), "UTF8"); | 162 final String content = new String(sink.toArray(), "UTF8"); |
163 tags.readGlobal(new StringReader(content)); | 163 tags.readGlobal(new StringReader(content)); |
164 } catch (CancelledException ex) { | 164 } catch (CancelledException ex) { |
165 // IGNORE, can't happen, we did not configure cancellation | 165 // IGNORE, can't happen, we did not configure cancellation |
166 getContext().getLog().debug(getClass(), ex, null); | 166 getContext().getLog().debug(getClass(), ex, null); |
167 } catch (HgDataStreamException ex) { | 167 } catch (HgException ex) { |
168 getContext().getLog().error(getClass(), ex, null); | 168 getContext().getLog().error(getClass(), ex, null); |
169 // FIXME need to react | 169 // FIXME need to react |
170 } catch (IOException ex) { | 170 } catch (IOException ex) { |
171 // UnsupportedEncodingException can't happen (UTF8) | 171 // UnsupportedEncodingException can't happen (UTF8) |
172 // only from readGlobal. Need to reconsider exceptions thrown from there: | 172 // only from readGlobal. Need to reconsider exceptions thrown from there: |