1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-23 16:18:50 -05:00

Merge pull request #88 from andrewgaul/log-throwable

Log Throwables instead of concatenating
This commit is contained in:
Andrew Chen 2011-11-03 06:32:20 -07:00
commit 9e74f9ffcf
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);
}
}
}