I want to log this exception but i don't know how to do it:
catch (ParseException pe) {
updateStatus("Connection Error.");
开发者_JAVA百科
Use the android.util.Log class:
Log.e("App-or-Class-identifier-for-filtering", "error message", pe);
If by log this exception you mean write a line to LogCat, just use the Log
class :
Log.e("tag", "Some error message you want to log");
You could use pe.printStackTrace() also.
精彩评论