开发者

How can i log this exception?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜