From 1c4946e85b3cb747f88907413d66bf07739d2b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rom=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 31 Dec 2020 12:34:38 +0100 Subject: [PATCH] Move RuntimeException to ImportParseExceptio so app is not crashes and import process go on. Fixes #557. --- .../opentracks/io/file/importer/KmzTrackImporter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/dennisguse/opentracks/io/file/importer/KmzTrackImporter.java b/src/main/java/de/dennisguse/opentracks/io/file/importer/KmzTrackImporter.java index 100ff406b..d30cd9ed8 100644 --- a/src/main/java/de/dennisguse/opentracks/io/file/importer/KmzTrackImporter.java +++ b/src/main/java/de/dennisguse/opentracks/io/file/importer/KmzTrackImporter.java @@ -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) {