开发者

How can i log this exception?

开发者 https://www.devze.com 2023-02-28 15:31 出处:网络
I want to log this exception but i don\'t know how to do it: catch (ParseException pe) { updateStatus(\"Connection Error.\");

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

精彩评论

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