I have a try/catch block that throws an exception and I would like to see information about the exception in the Android device log.
I read the log of the mobile de
KOTLIN SOLUTION:
You can make use of the helper function getStackTraceString()
belonging to the android.util.Log
class to print the entire error message on console.
Example:
try {
// your code here
} catch (e: Exception) {
Log.e("TAG", "Exception occurred, stack trace: " + e.getStackTraceString());
}