Improved logging of exceptions.

This commit is contained in:
Henrik Tunedal 2011-02-03 03:31:14 +01:00
parent 47a3db7767
commit f602e4586c
4 changed files with 10 additions and 8 deletions

View File

@ -526,7 +526,8 @@ public class AppDetails extends ListActivity {
}
}
} catch (Exception e) {
Log.d("FDroid", "Download failed - " + e.getMessage());
Log.e("FDroid", "Download failed:\n"
+ Log.getStackTraceString(e));
Message msg = new Message();
msg.obj = e.getMessage();
download_error_handler.sendMessage(msg);

View File

@ -281,7 +281,8 @@ public class DB {
// Also try and delete the old one, from versions 0.13 and earlier.
ctx.deleteDatabase("fdroid_db");
} catch (Exception ex) {
Log.d("FDroid", "Exception in DB.delete: " + ex.getMessage());
Log.e("FDroid", "Exception in DB.delete:\n"
+ Log.getStackTraceString(ex));
}
}
@ -401,8 +402,8 @@ public class DB {
}
} catch (Exception e) {
Log.d("FDroid", "Exception during database reading - "
+ e.getMessage() + " ... " + e.toString());
Log.e("FDroid", "Exception during database reading:\n"
+ Log.getStackTraceString(e));
} finally {
if (c != null) {
c.close();

View File

@ -321,8 +321,8 @@ public class RepoXMLHandler extends DefaultHandler {
}
} catch (Exception e) {
Log.d("FDroid", "Exception updating from " + repo.address
+ " - " + e.toString());
Log.e("FDroid", "Exception updating from " + repo.address
+ ":\n" + Log.getStackTraceString(e));
return false;
} finally {
ctx.deleteFile("tempindex.xml");

View File

@ -135,8 +135,8 @@ public class UpdateService extends Service {
}
} catch (Exception e) {
Log.d("FDroid", "Exception during handleCommand() - "
+ e.getMessage());
Log.e("FDroid", "Exception during handleCommand():\n"
+ Log.getStackTraceString(e));
} finally {
if (db != null)
db.close();