N.B. Others have asked this question and gotten flagged as duplicate. When I looked at the "answers" to the duplicates none of them seemed to actually answer the question, with some posters denying that it's even possible for this condition to exist. So before you flag this as duplicate look at your proposed duplicate answer to see if it actually does answer the question.
Examples:
Java: Exception itself is null
How is it possible that the Exception is null inside of a catch block?
I'm debugging an Android program, running on an actual device (i.e., not in emulation) using Eclipse (Indigo). When I execute this code here . . .
try {
bCheckState = confirmed.get(position);
}
catch(Exception e) {
Log.e ("MyListActivity.confirmed.get(position) Crash", "details " + e);
int confirmedCount = confirmed.size(); // for debugging
}
... it lands in the catch block and e is null. I don't think the debugger and source code are out of sync because when I step from the logging line to the next line that's when the log entry appears in the log. And when I step through the next line confirmedCount changes appropriately. The log entry says:
05-13 11:55:54.966: E/MyListActivity.confirmed.get(position) Crash(11491): details null
... which seems to suggest it really is null.
So what's going on here?