Report attachment errors

pull/157/head
M66B 6 years ago
parent c94f272714
commit 7a988e3005

@ -133,7 +133,7 @@ public class EntityAttachment {
Helper.copy(source, target); Helper.copy(source, target);
} catch (IOException ex) { } catch (IOException ex) {
Log.e(ex); Log.e(ex);
db.attachment().setProgress(attachment.id, null); db.attachment().setError(attachment.id, Helper.formatThrowable(ex, false));
} }
} }
} }

@ -1893,7 +1893,8 @@ public class FragmentCompose extends FragmentBase {
} catch (IOException ex) { } catch (IOException ex) {
// Reset progress on failure // Reset progress on failure
db.attachment().setProgress(attachment.id, null); Log.e(ex);
db.attachment().setError(attachment.id, Helper.formatThrowable(ex, false));
throw ex; throw ex;
} }

@ -923,6 +923,7 @@ public class MessageHelper {
throw new MessagingException("downloadAttachment", ex); throw new MessagingException("downloadAttachment", ex);
} catch (Throwable ex) { } catch (Throwable ex) {
// Reset progress on failure // Reset progress on failure
Log.e(ex);
db.attachment().setError(local.id, Helper.formatThrowable(ex)); db.attachment().setError(local.id, Helper.formatThrowable(ex));
throw ex; throw ex;
} }

Loading…
Cancel
Save