Exception handling
This commit is contained in:
parent
4ad562867e
commit
07078620ae
1 changed files with 6 additions and 1 deletions
|
@ -593,7 +593,12 @@ public class BinaryMapIndexReader {
|
|||
}
|
||||
|
||||
public int preloadStreets(City c, SearchRequest<Street> resultMatcher) throws IOException {
|
||||
AddressRegion reg = checkAddressIndex(c.getFileOffset());
|
||||
AddressRegion reg;
|
||||
try {
|
||||
reg = checkAddressIndex(c.getFileOffset());
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new IOException(e.getMessage() + " while reading " + c + " (id: " + c.getId() + ")");
|
||||
}
|
||||
codedIS.seek(c.getFileOffset());
|
||||
int size = codedIS.readRawVarint32();
|
||||
int old = codedIS.pushLimit(size);
|
||||
|
|
Loading…
Reference in a new issue