log exceptions

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-04-07 10:00:29 +02:00
parent 68c09d8e81
commit cc5d3d968e
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
6 changed files with 25 additions and 24 deletions

View File

@ -21,6 +21,8 @@
package com.nextcloud.talk.components.filebrowser.models.properties;
import android.text.TextUtils;
import android.util.Log;
import at.bitfire.dav4android.Property;
import at.bitfire.dav4android.PropertyFactory;
import at.bitfire.dav4android.XmlUtils;
@ -55,10 +57,8 @@ public class NCEncrypted implements Property {
if (!TextUtils.isEmpty(text)) {
return new NCEncrypted(Boolean.parseBoolean(text));
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException | XmlPullParserException e) {
Log.e("NCEncrypted", "failed to create property", e);
}
return new NCEncrypted(false);

View File

@ -3,6 +3,8 @@
*
* @author Mario Danic
* Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com>
* @author Marcel Hibbe
* Copyright (C) 2021 Marcel Hibbe <dev@mhibbe.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -21,6 +23,7 @@
package com.nextcloud.talk.components.filebrowser.models.properties;
import android.text.TextUtils;
import android.util.Log;
import com.nextcloud.talk.components.filebrowser.webdav.DavUtils;
@ -58,10 +61,8 @@ public class NCPermission implements Property {
if (!TextUtils.isEmpty(text)) {
return new NCPermission(text);
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException | XmlPullParserException e) {
Log.e("NCPermission", "failed to create property", e);
}
return new NCPermission("");

View File

@ -21,6 +21,8 @@
package com.nextcloud.talk.components.filebrowser.models.properties;
import android.text.TextUtils;
import android.util.Log;
import at.bitfire.dav4android.Property;
import at.bitfire.dav4android.PropertyFactory;
import at.bitfire.dav4android.XmlUtils;
@ -55,10 +57,8 @@ public class NCPreview implements Property {
if (!TextUtils.isEmpty(text)) {
return new NCPreview(Boolean.parseBoolean(text));
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException | XmlPullParserException e) {
Log.e("NCPreview", "failed to create property", e);
}
return new OCFavorite(false);

View File

@ -21,6 +21,8 @@
package com.nextcloud.talk.components.filebrowser.models.properties;
import android.text.TextUtils;
import android.util.Log;
import at.bitfire.dav4android.Property;
import at.bitfire.dav4android.PropertyFactory;
import at.bitfire.dav4android.XmlUtils;
@ -55,10 +57,8 @@ public class OCFavorite implements Property {
if (!TextUtils.isEmpty(text)) {
return new OCFavorite(Boolean.parseBoolean(text));
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException | XmlPullParserException e) {
Log.e("OCFavorite", "failed to create property", e);
}
return new OCFavorite(false);

View File

@ -21,6 +21,8 @@
package com.nextcloud.talk.components.filebrowser.models.properties;
import android.text.TextUtils;
import android.util.Log;
import at.bitfire.dav4android.Property;
import at.bitfire.dav4android.PropertyFactory;
import at.bitfire.dav4android.XmlUtils;
@ -55,10 +57,8 @@ public class OCId implements Property {
if (!TextUtils.isEmpty(text)) {
return new OCId(text);
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException | XmlPullParserException e) {
Log.e("OCId", "failed to create property", e);
}
return new OCId("");

View File

@ -21,6 +21,8 @@
package com.nextcloud.talk.components.filebrowser.models.properties;
import android.text.TextUtils;
import android.util.Log;
import at.bitfire.dav4android.Property;
import at.bitfire.dav4android.PropertyFactory;
import at.bitfire.dav4android.XmlUtils;
@ -56,10 +58,8 @@ public class OCSize implements Property {
if (!TextUtils.isEmpty(text)) {
return new OCSize(Long.parseLong(text));
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException | XmlPullParserException e) {
Log.e("OCSize", "failed to create property", e);
}
return new OCSize(-1);