I believe this is what you need:
catch (Exception e) {
Log.e(TAG,Log.getStackTraceString(e));
}
More Related Contents:
- Why is exception.printStackTrace() considered bad practice?
- What is the use of printStackTrace() method in Java?
- How can I solve “java.lang.NoClassDefFoundError”?
- What are the effects of exceptions on performance in Java?
- How to generate exceptions from RepaintManager
- ClassNotFoundException com.mysql.jdbc.Driver [duplicate]
- How to create custom exceptions in Java? [closed]
- Given final block not properly padded
- Null check chain vs catching NullPointerException
- When should we create our own Java exception classes? [closed]
- How to test that no exception is thrown?
- Using Joda Date & Time API to parse multiple formats
- How to create a custom exception type in Java? [duplicate]
- Why are Exceptions not Checked in .NET?
- Java: Exceptions as control flow?
- Closing a Scanner throws java.util.NoSuchElementException
- “NoClassDefFoundError: Could not initialize class” error
- What is a suppressed exception?
- What are reasons for Exceptions not to be compatible with throws clauses?
- In Java how can I validate a thrown exception with JUnit?
- The throws keyword for exceptions in Java
- Exception other than RuntimeException
- Getting Exception org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
- Exception in thread “main” java.io.FileNotFoundException: Error
- Android exception handling best practice?
- How to avoid a NoRouteToHostException?
- Is there an unhandled exception handler in Java?
- The local variable might not have been initialized – Detect unchecked exception throw within a method
- org.openqa.selenium.UnhandledAlertException: unexpected alert open
- Side effects of throwing an exception inside a synchronized clause?