Refactoring

pull/146/head
M66B 6 years ago
parent 8e3088e67b
commit 7898fa1178

@ -170,11 +170,13 @@ public class Helper {
static String formatThrowable(Throwable ex) { static String formatThrowable(Throwable ex) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(ex.getMessage() == null ? ex.getClass().getName() : ex.getMessage()); sb.append(ex.getMessage() == null ? ex.getClass().getName() : ex.getMessage());
Throwable cause = ex.getCause(); Throwable cause = ex.getCause();
while (cause != null) { while (cause != null) {
sb.append(" ").append(cause.getMessage() == null ? cause.getClass().getName() : cause.getMessage()); sb.append(" ").append(cause.getMessage() == null ? cause.getClass().getName() : cause.getMessage());
cause = cause.getCause(); cause = cause.getCause();
} }
return sb.toString(); return sb.toString();
} }

@ -1433,6 +1433,7 @@ public class ServiceSynchronize extends LifecycleService {
reportError(account, folder, ex); reportError(account, folder, ex);
db.operation().setOperationError(op.id, Helper.formatThrowable(ex)); db.operation().setOperationError(op.id, Helper.formatThrowable(ex));
if (message != null && if (message != null &&
!(ex instanceof MessageRemovedException) && !(ex instanceof MessageRemovedException) &&
!(ex instanceof FolderClosedException) && !(ex instanceof FolderClosedException) &&

Loading…
Cancel
Save