I got problem with Android. I develop on device and have problem with catching exceptions. I'm running some code in AsyncTask and finally simplified it to:
try
{
if (true)
throw new Exception("ERROR");
}
catch (Exception e)
{
Log.e("e", "exception", e);
}
My problem is that 'e' variable is always null. Not sure what's happening actually. What's more it sometimes works, but I can't say when. I just get up from computer for few minutes come back and boom, it works. Doing coding few minutes and again it's null... There was one question on SO about 1 year ago but noone known answer. Maybe this time someone will have some idea.
I think that it have something to do with AsyncTask as outside of it, I got exception catched properly... still don't have any clue why :( I found it only happens when debbuger is connected. When I take out cable from device it actually catches and exception isn't null anymore...