Reputation: 1594
Using Throwable object, we can get the full stack trace of the crash, and using its class name we can also get the type of exception e.g. java.lang.NullPointerException
, java.lang.ArithmeticException
etc.
Following image is taken from the crashlytics which finds the exact source of crash from the entire crash log and also highlights the same with blue color. I need to understand how crashlytics finds out the exact lines of code that made the app crash.
The Next Picture which is after scrolling at the end of crash log is below:
As you can see in the pics, crashlytics highlighted only two lines in the pics from entire crash log, if I iterate over the StrackTraceElement
, I get all the lines from the array till the end which is unnecessary.
I want to know the exact lines of crash log which indicates the main reason behind the crash programmatically.
Upvotes: 0
Views: 145