aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-21 20:12:32 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-21 20:12:32 +0100
commit51b878f749a367904cf9af4a5560ccd7443e3ed1 (patch)
tree5e335a7fcc87aad8e615dde84a535406048efd10 /src/main
parentb582aae255bcd6e9726609db439ff30119b3fb6e (diff)
catch some more exception when retrieving media runtime
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/FileBackend.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
index 17a90c84a..79e8980e9 100644
--- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
@@ -861,7 +861,7 @@ public class FileBackend {
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
mediaMetadataRetriever.setDataSource(mXmppConnectionService, uri);
return Integer.parseInt(mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION));
- } catch (IllegalArgumentException e) {
+ } catch (RuntimeException e) {
return 0;
}
}
@@ -940,7 +940,7 @@ public class FileBackend {
try {
metadataRetriever.setDataSource(file.getAbsolutePath());
} catch (Exception e) {
- throw new NotAVideoFile();
+ throw new NotAVideoFile(e);
}
return getVideoDimensions(metadataRetriever);
}
@@ -1012,7 +1012,13 @@ public class FileBackend {
}
private static class NotAVideoFile extends Exception {
+ public NotAVideoFile(Throwable t) {
+ super(t);
+ }
+ public NotAVideoFile() {
+ super();
+ }
}
public class FileCopyException extends Exception {