From 5af0d12cd4696a2cf8d794dd2dc66dda5e064d03 Mon Sep 17 00:00:00 2001 From: talregev Date: Mon, 8 Mar 2021 22:47:29 +0200 Subject: [PATCH] Update BOINCUtils.kt Fix warning print to log an exception. (do it in the right way). --- .../app/src/main/java/edu/berkeley/boinc/utils/BOINCUtils.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/utils/BOINCUtils.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/utils/BOINCUtils.kt index 1486e2cc3c..9bac09f8d6 100644 --- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/utils/BOINCUtils.kt +++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/utils/BOINCUtils.kt @@ -118,8 +118,9 @@ class TaskRunner(private val callback: ((V) -> Unit)? , private val callable: callback?.invoke(result) result } catch (e: Exception) { - Log.d(Logging.TAG, e.message) - e.printStackTrace() + if (Logging.ERROR) { + Log.e(Logging.TAG, "BOINCUtils.TaskRunner error: ", e) + } throw e } }