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;
|
||||
}
|
||||
} catch (Exception es) {
|
||||
log.error("Parse exception", es);
|
||||
}
|
||||
item.date = date;
|
||||
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$
|
||||
} catch (IOException e) {
|
||||
// swallow io exception
|
||||
log.error("IOException" ,e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -315,10 +317,12 @@ public class DownloadOsmandIndexesHelper {
|
|||
Date d = format.parse(item.getDate());
|
||||
entry.dateModified = d.getTime();
|
||||
} catch (ParseException e1) {
|
||||
log.error("ParseException" ,e1);
|
||||
}
|
||||
try {
|
||||
entry.sizeMB = Double.parseDouble(item.getSize());
|
||||
} catch (NumberFormatException e1) {
|
||||
log.error("ParseException" ,e1);
|
||||
}
|
||||
entry.parts = 1;
|
||||
if (item.getParts() != null) {
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.TreeSet;
|
|||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.Version;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.IndexConstants;
|
||||
|
@ -70,6 +71,8 @@ import android.widget.Toast;
|
|||
|
||||
public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
||||
|
||||
private static final org.apache.commons.logging.Log log = LogUtil.getLog(DownloadIndexActivity.class);
|
||||
|
||||
/** menus **/
|
||||
private static final int RELOAD_ID = 0;
|
||||
private static final int SELECT_ALL_ID = 1;
|
||||
|
@ -296,6 +299,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
try {
|
||||
startActivity(intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
log.error("Exception", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -669,6 +673,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
fileToUnzip.setLastModified(this.dateModified);
|
||||
res = true;
|
||||
} catch (IOException e) {
|
||||
log.error("Copy exception", e);
|
||||
}
|
||||
} else {
|
||||
res = downloadFileHelper.downloadFile(filename, fileToSave, fileToUnzip, unzip, progress, dateModified, parts,
|
||||
|
|
Loading…
Reference in a new issue