summaryrefslogtreecommitdiff
path: root/app/src/main/java/de
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-04-01 19:00:04 +0200
committercyBerta <cyberta@riseup.net>2019-04-01 19:00:04 +0200
commit9eb20164f227fb617b2ea9700ebd493f9bf7caa4 (patch)
treef0638f75e622f4a5418f2f467415c4b9b2b52bc9 /app/src/main/java/de
parent7932f484643b9d3bb93cc4cfa0b5c60308e67227 (diff)
catch resource not found exception in LogItem
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/LogItem.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/LogItem.java b/app/src/main/java/de/blinkt/openvpn/core/LogItem.java
index cd048f4a..178906c3 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/LogItem.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/LogItem.java
@@ -10,6 +10,7 @@ import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
+import android.content.res.Resources.NotFoundException;
import android.os.Parcel;
import android.os.Parcelable;
@@ -265,6 +266,11 @@ public class LogItem implements Parcelable {
return str;
}
}
+ } catch (NotFoundException e) {
+ String str = "Log resid not found: " + mRessourceId;
+ if (mArgs != null)
+ str += join("|", mArgs);
+ return str;
} catch (UnknownFormatConversionException e) {
if (c != null)
throw new UnknownFormatConversionException(e.getLocalizedMessage() + getString(null));