-1

I am getting exception as null. I don't understand why it is happening and how can i resolve it. please guide. enter image description here

Edit: i tried to call it with inner class it is throwing null exception . and with public class defined outside the class it is working fine.

Note : The class is a asyncTask from which i am calling it.

Rajiv yadav
  • 823
  • 8
  • 24
  • 3
    Have you tried to print out your exception? It could be a debug error where it's not showing the correct value. – JREN Jun 27 '13 at 11:35
  • I have never seen that happen... I believe it is a bug in your IDE. – fge Jun 27 '13 at 11:37
  • Try to catch the subtype of Exception you need for every case, just 1 catch with Exception is not very useful. – zozelfelfo Jun 27 '13 at 11:37
  • I had the same problem once and posted a question on SO, check it out: http://stackoverflow.com/questions/12586563/ioexception-e-is-null – Piotr Chojnacki Jun 27 '13 at 12:08

1 Answers1

1

Have you considered the fact that you might've caught a NullPointerException? Try doing the following in your catch clause:

Log.d("TAG", "ex.toString() => " + ex.toString());

This phenomenon is called a "naked null" (see the comments for more information).

Community
  • 1
  • 1
karllindmark
  • 6,031
  • 1
  • 26
  • 41