From 0f0dbb2180028cd403523369119e63a8c620ae39 Mon Sep 17 00:00:00 2001 From: sonora Date: Sat, 31 Oct 2015 13:23:47 +0100 Subject: [PATCH] add file indication to error message to facilitate debugging --- OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java index 58ba785399..f727990a4f 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java @@ -1,4 +1,4 @@ -package net.osmand.binary; +package net.osmand.binary; import gnu.trove.list.array.TIntArrayList; @@ -162,7 +162,8 @@ public class BinaryMapIndexReader { switch (tag) { case 0: if(!initCorrectly){ - throw new IOException("Corrupted file. It should be ended as it starts with version"); //$NON-NLS-1$ + //throw new IOException("Corrupted file. It should be ended as it starts with version"); //$NON-NLS-1$ + throw new IOException("Corrupt file, it should have ended as it starts with version: " + file.getName()); //$NON-NLS-1$ } return; case OsmandOdb.OsmAndStructure.VERSION_FIELD_NUMBER :