Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgLookup.java @ 215:41a778e3fd31
Issue 5: Facilities for progress and cancellation. More specific exceptions. Exceptions from callbacks as RuntimeException
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 17 May 2011 00:56:54 +0200 |
parents | 44a34baabea0 |
children | 981f9f50bb6c |
comparison
equal
deleted
inserted
replaced
214:4252faa556cd | 215:41a778e3fd31 |
---|---|
68 } catch (IOException ex) { | 68 } catch (IOException ex) { |
69 throw new HgException(location.toString(), ex); | 69 throw new HgException(location.toString(), ex); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 public HgBundle loadBundle(File location) throws HgException { | 73 public HgBundle loadBundle(File location) /*XXX perhaps, HgDataStreamException or anything like HgMalformedDataException? Or RuntimeEx is better?*/{ |
74 if (location == null || !location.canRead()) { | 74 if (location == null || !location.canRead()) { |
75 throw new IllegalArgumentException(); | 75 throw new IllegalArgumentException(); |
76 } | 76 } |
77 return new HgBundle(new DataAccessProvider(), location).link(); | 77 return new HgBundle(new DataAccessProvider(), location).link(); |
78 } | 78 } |