1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 05:02:26 -05:00

Log Throwable instead of concatenating

This commit is contained in:
Andrew Gaul 2011-11-02 22:18:30 -07:00
parent 976761e0e5
commit 2599bdcc75
5 changed files with 9 additions and 9 deletions

View File

@ -599,7 +599,7 @@ public class K9 extends Application {
catch (Exception e) {
// Discard , as it means we're not running on a device with strict mode
Log.v(K9.LOG_TAG, "Failed to turn on strict mode " + e);
Log.v(K9.LOG_TAG, "Failed to turn on strict mode", e);
}
}

View File

@ -156,7 +156,7 @@ public class FolderSettings extends K9PreferenceActivity {
try {
saveSettings();
} catch (MessagingException e) {
Log.e(K9.LOG_TAG, "Saving folder settings failed " + e);
Log.e(K9.LOG_TAG, "Saving folder settings failed", e);
}
}
return super.onKeyDown(keyCode, event);

View File

@ -217,9 +217,9 @@ public abstract class Message implements Part, Body {
eolOut.flush();
return out.getCount();
} catch (IOException e) {
Log.e(K9.LOG_TAG, "Failed to calculate a message size: " + e);
Log.e(K9.LOG_TAG, "Failed to calculate a message size", e);
} catch (MessagingException e) {
Log.e(K9.LOG_TAG, "Failed to calculate a message size: " + e);
Log.e(K9.LOG_TAG, "Failed to calculate a message size", e);
}
return 0;
}

View File

@ -299,14 +299,14 @@ public class LocalStore extends Store implements Serializable {
String name = cursor.getString(1);
update41Metadata(db, prefs, id, name);
} catch (Exception e) {
Log.e(K9.LOG_TAG, " error trying to ugpgrade a folder class: " + e);
Log.e(K9.LOG_TAG, " error trying to ugpgrade a folder class", e);
}
}
}
catch (SQLiteException e) {
Log.e(K9.LOG_TAG, "Exception while upgrading database to v41. folder classes may have vanished " + e);
Log.e(K9.LOG_TAG, "Exception while upgrading database to v41. folder classes may have vanished", e);
} finally {
if (cursor != null) {
@ -420,7 +420,7 @@ public class LocalStore extends Store implements Serializable {
inTopGroup = prefs.getBoolean(uUid + "." + name + ".inTopGroup", inTopGroup);
integrate = prefs.getBoolean(uUid + "." + name + ".integrate", integrate);
} catch (Exception e) {
Log.e(K9.LOG_TAG, " Throwing away an error while trying to upgrade folder metadata: " + e);
Log.e(K9.LOG_TAG, " Throwing away an error while trying to upgrade folder metadata", e);
}
if (displayClass == Folder.FolderClass.NONE) {
@ -1003,7 +1003,7 @@ public class LocalStore extends Store implements Serializable {
i++;
}
} catch (Exception e) {
Log.d(K9.LOG_TAG, "Got an exception " + e);
Log.d(K9.LOG_TAG, "Got an exception", e);
} finally {
if (cursor != null) {
cursor.close();

View File

@ -254,7 +254,7 @@ public class SmtpTransport extends Transport {
mLargestAcceptableMessage = Integer.parseInt(result.substring(result.lastIndexOf(' ') + 1));
} catch (Exception e) {
if (K9.DEBUG && K9.DEBUG_PROTOCOL_SMTP) {
Log.d(K9.LOG_TAG, "Tried to parse " + result + " and get an int out of the last word: " + e);
Log.d(K9.LOG_TAG, "Tried to parse " + result + " and get an int out of the last word", e);
}
}
}