mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-04 03:43:55 +01:00
Prevent crash
This commit is contained in:
@@ -131,7 +131,11 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||||||
onPreExecute(args);
|
onPreExecute(args);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
onException(args, ex);
|
try {
|
||||||
|
onException(args, ex);
|
||||||
|
} catch (Throwable exex) {
|
||||||
|
Log.e(exex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
future = getExecutor(context).submit(new Runnable() {
|
future = getExecutor(context).submit(new Runnable() {
|
||||||
@@ -196,7 +200,11 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||||||
onPostExecute(args);
|
onPostExecute(args);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
onException(args, ex);
|
try {
|
||||||
|
onException(args, ex);
|
||||||
|
} catch (Throwable exex) {
|
||||||
|
Log.e(exex);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
if (ex == null) {
|
if (ex == null) {
|
||||||
@@ -209,10 +217,18 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||||||
|
|
||||||
onExecuted(args, (T) data);
|
onExecuted(args, (T) data);
|
||||||
} else
|
} else
|
||||||
onException(args, ex);
|
try {
|
||||||
|
onException(args, ex);
|
||||||
|
} catch (Throwable exex) {
|
||||||
|
Log.e(exex);
|
||||||
|
}
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
onException(args, ex);
|
try {
|
||||||
|
onException(args, ex);
|
||||||
|
} catch (Throwable exex) {
|
||||||
|
Log.e(exex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user