Move RuntimeException to ImportParseExceptio so app is not crashes and import process go on. Fixes #557.

This commit is contained in:
Román Martínez
2020-12-31 12:34:38 +01:00
parent fd1b7b8af9
commit 1c4946e85b
@@ -171,7 +171,7 @@ public class KmzTrackImporter implements TrackImporter {
trackId = parseKml(zipInputStream);
if (trackId == null) {
Log.d(TAG, "Unable to parse kml in kmz");
throw new RuntimeException(context.getString(R.string.import_unable_to_import_file, fileName));
throw new ImportParserException(context.getString(R.string.import_unable_to_import_file, fileName));
}
}
@@ -179,7 +179,7 @@ public class KmzTrackImporter implements TrackImporter {
}
if (trackId == null) {
Log.d(TAG, "Unable to find doc.kml in kmz");
throw new RuntimeException(context.getString(R.string.import_no_kml_file_found));
throw new ImportParserException(context.getString(R.string.import_no_kml_file_found));
}
return trackId;
} catch (ImportParserException | ImportAlreadyExistsException e) {