I catch the following code in a try/catch statement:
catch (Exception e){
Log.d("MyTag", "exception ->: "+e.toString());
}
It prints:
MyTag: exception ->: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
How can I make it print the line number along with the error message because I am finding it difficult to locate this null object reference string within my code?