Don't swallow exception
This commit is contained in:
parent
3defd7cb04
commit
4f6c193ccc
2 changed files with 9 additions and 0 deletions
|
@ -83,6 +83,7 @@ public class DownloadOsmandIndexesHelper {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} catch (Exception es) {
|
} catch (Exception es) {
|
||||||
|
log.error("Parse exception", es);
|
||||||
}
|
}
|
||||||
item.date = date;
|
item.date = date;
|
||||||
String assetName = "voice" + File.separatorChar + voice + File.separatorChar + "config.p";
|
String assetName = "voice" + File.separatorChar + voice + File.separatorChar + "config.p";
|
||||||
|
@ -297,6 +298,7 @@ public class DownloadOsmandIndexesHelper {
|
||||||
new File(parent, ".nomedia").createNewFile();//$NON-NLS-1$
|
new File(parent, ".nomedia").createNewFile();//$NON-NLS-1$
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// swallow io exception
|
// swallow io exception
|
||||||
|
log.error("IOException" ,e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,10 +317,12 @@ public class DownloadOsmandIndexesHelper {
|
||||||
Date d = format.parse(item.getDate());
|
Date d = format.parse(item.getDate());
|
||||||
entry.dateModified = d.getTime();
|
entry.dateModified = d.getTime();
|
||||||
} catch (ParseException e1) {
|
} catch (ParseException e1) {
|
||||||
|
log.error("ParseException" ,e1);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
entry.sizeMB = Double.parseDouble(item.getSize());
|
entry.sizeMB = Double.parseDouble(item.getSize());
|
||||||
} catch (NumberFormatException e1) {
|
} catch (NumberFormatException e1) {
|
||||||
|
log.error("ParseException" ,e1);
|
||||||
}
|
}
|
||||||
entry.parts = 1;
|
entry.parts = 1;
|
||||||
if (item.getParts() != null) {
|
if (item.getParts() != null) {
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.util.TreeSet;
|
||||||
|
|
||||||
import net.osmand.Algoritms;
|
import net.osmand.Algoritms;
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
|
import net.osmand.LogUtil;
|
||||||
import net.osmand.Version;
|
import net.osmand.Version;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.data.IndexConstants;
|
import net.osmand.data.IndexConstants;
|
||||||
|
@ -70,6 +71,8 @@ import android.widget.Toast;
|
||||||
|
|
||||||
public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
||||||
|
|
||||||
|
private static final org.apache.commons.logging.Log log = LogUtil.getLog(DownloadIndexActivity.class);
|
||||||
|
|
||||||
/** menus **/
|
/** menus **/
|
||||||
private static final int RELOAD_ID = 0;
|
private static final int RELOAD_ID = 0;
|
||||||
private static final int SELECT_ALL_ID = 1;
|
private static final int SELECT_ALL_ID = 1;
|
||||||
|
@ -296,6 +299,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
||||||
try {
|
try {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} catch (ActivityNotFoundException e) {
|
} catch (ActivityNotFoundException e) {
|
||||||
|
log.error("Exception", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -669,6 +673,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
||||||
fileToUnzip.setLastModified(this.dateModified);
|
fileToUnzip.setLastModified(this.dateModified);
|
||||||
res = true;
|
res = true;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
log.error("Copy exception", e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res = downloadFileHelper.downloadFile(filename, fileToSave, fileToUnzip, unzip, progress, dateModified, parts,
|
res = downloadFileHelper.downloadFile(filename, fileToSave, fileToUnzip, unzip, progress, dateModified, parts,
|
||||||
|
|
Loading…
Reference in a new issue