changed error message for missing datafile to include filename

This commit is contained in:
Arndt 2015-02-08 10:05:50 +01:00
parent 5f34b5cf41
commit 0fe5d5144a
3 changed files with 18 additions and 2 deletions

View file

@ -33,6 +33,8 @@ public final class NodesCache
public DistanceChecker distanceChecker;
public boolean oom_carsubset_hint = false;
public boolean first_file_access_failed = false;
public String first_file_access_name;
private long cacheSum = 0;
private boolean garbageCollectionEnabled = false;
@ -48,6 +50,9 @@ public final class NodesCache
this.carMode = carMode;
this.forceSecondaryData = forceSecondaryData;
first_file_access_failed = false;
first_file_access_name = null;
if ( !this.segmentDir.isDirectory() ) throw new RuntimeException( "segment directory " + segmentDir + " does not exist" );
if ( oldCache != null )
@ -249,6 +254,13 @@ public final class NodesCache
OsmFile osmf = new OsmFile( ra, tileIndex, iobuffer );
osmf.lonDegree = lonDegree;
osmf.latDegree = latDegree;
if ( first_file_access_name == null )
{
first_file_access_name = currentFileName;
first_file_access_failed = osmf.filename == null;
}
return osmf;
}