androniennn
androniennn

Reputation: 3137

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.");

Upvotes: 1

Views: 102

Answers (3)

FoamyGuy
FoamyGuy

Reputation: 46856

You could use pe.printStackTrace() also.

Upvotes: 1

Ted Hopp
Ted Hopp

Reputation: 234857

Use the android.util.Log class:

Log.e("App-or-Class-identifier-for-filtering", "error message", pe);

Upvotes: 2

Pascal MARTIN
Pascal MARTIN

Reputation: 401182

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");

Upvotes: 2

Related Questions