0

I have a code like:

try{
    //todo somethins
} catch(Exception e){
    Log.e("tag", e.getMessage());
}

And I catched NullPointerException on row Log.e("tag", e.getMessage()); at google analytic page How is it possible?

Alex Klimashevsky
  • 2,457
  • 3
  • 26
  • 58

1 Answers1

1

Your e.getMessage() is probably null. The exception that you are catching doesn't have a message.

Also don't try to catch raw exceptions. You could use NullPointerException.

See this link: Exception.getMessage() is null

Community
  • 1
  • 1
Ronald Meijboom
  • 1,534
  • 3
  • 17
  • 37