logs exception
This commit is contained in:
parent
8623368292
commit
8e83ae326a
|
@ -30,6 +30,8 @@ import android.annotation.TargetApi;
|
|||
import android.app.job.JobParameters;
|
||||
import android.os.Build;
|
||||
|
||||
import org.mariotaku.twidere.util.Analyzer;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -69,9 +71,11 @@ public class JobServiceSupport {
|
|||
return false;
|
||||
} catch (IllegalAccessException e) {
|
||||
// This shouldn't happen, skip
|
||||
Analyzer.Companion.logException(e);
|
||||
return false;
|
||||
} catch (InvocationTargetException e) {
|
||||
// Internal error, skip
|
||||
Analyzer.Companion.logException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -85,9 +89,11 @@ public class JobServiceSupport {
|
|||
return true;
|
||||
} catch (NoSuchFieldException e) {
|
||||
// Framework version mismatch, skip
|
||||
Analyzer.Companion.logException(e);
|
||||
return false;
|
||||
} catch (IllegalAccessException e) {
|
||||
// This shouldn't happen, skip
|
||||
Analyzer.Companion.logException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import android.os.Build
|
|||
import org.mariotaku.kpreferences.KPreferences
|
||||
import org.mariotaku.twidere.annotation.AutoRefreshType
|
||||
import org.mariotaku.twidere.constant.autoRefreshCompatibilityModeKey
|
||||
import org.mariotaku.twidere.util.Analyzer
|
||||
import org.mariotaku.twidere.util.TaskServiceRunner
|
||||
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper
|
||||
import org.mariotaku.twidere.util.support.JobServiceSupport
|
||||
|
@ -64,6 +65,7 @@ class JobTaskService : JobService() {
|
|||
}
|
||||
} catch (e: Exception) {
|
||||
// Swallow any possible exceptions
|
||||
Analyzer.logException(e)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue