Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgLookup.java @ 425:48f993aa2f41
FIXMEs: exceptions, javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 28 Mar 2012 18:39:29 +0200 |
parents | 9c9c442b5f2e |
children | 12f668401613 |
comparison
equal
deleted
inserted
replaced
424:6437d261048a | 425:48f993aa2f41 |
---|---|
78 t.setLocation(location.getPath()).initCause(ex); | 78 t.setLocation(location.getPath()).initCause(ex); |
79 throw t; | 79 throw t; |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 public HgBundle loadBundle(File location) throws HgRuntimeException/*FIXME need checked exception for can't find*/ { | 83 public HgBundle loadBundle(File location) throws HgRepositoryNotFoundException { |
84 if (location == null || !location.canRead()) { | 84 if (location == null || !location.canRead()) { |
85 throw new HgInvalidFileException(String.format("Can't read file %s", location == null ? null : location.getPath()), null, location); | 85 throw new HgRepositoryNotFoundException(String.format("Can't read file %s", location)).setLocation(String.valueOf(location)); |
86 } | 86 } |
87 return new HgBundle(getContext(), new DataAccessProvider(getContext()), location).link(); | 87 return new HgBundle(getContext(), new DataAccessProvider(getContext()), location).link(); |
88 } | 88 } |
89 | 89 |
90 /** | 90 /** |