diff options
| author | Jacek Surazski <jaceks@google.com> | 2009-06-23 14:57:08 +0200 |
|---|---|---|
| committer | Jacek Surazski <jaceks@google.com> | 2009-06-24 16:12:42 +0200 |
| commit | 5a12373277f6ce14101f08580bc4f08f9a3d7c50 (patch) | |
| tree | c25822c436308b2496b08b88dc1916b672802ba7 | |
| parent | 6b3ade68e0a2541600dc8bcc803c7b3d061b2153 (diff) | |
| download | frameworks_base-5a12373277f6ce14101f08580bc4f08f9a3d7c50.zip frameworks_base-5a12373277f6ce14101f08580bc4f08f9a3d7c50.tar.gz frameworks_base-5a12373277f6ce14101f08580bc4f08f9a3d7c50.tar.bz2 | |
Add exception line number to ApplicationErrorReport
| -rw-r--r-- | core/java/android/app/ApplicationErrorReport.java | 8 | ||||
| -rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java index 6b17236..aeae5f9 100644 --- a/core/java/android/app/ApplicationErrorReport.java +++ b/core/java/android/app/ApplicationErrorReport.java @@ -171,6 +171,11 @@ public class ApplicationErrorReport implements Parcelable { public String throwMethodName; /** + * Line number the exception was thrown from. + */ + public int throwLineNumber; + + /** * Stack trace. */ public String stackTrace; @@ -190,6 +195,7 @@ public class ApplicationErrorReport implements Parcelable { throwFileName = in.readString(); throwClassName = in.readString(); throwMethodName = in.readString(); + throwLineNumber = in.readInt(); stackTrace = in.readString(); } @@ -202,6 +208,7 @@ public class ApplicationErrorReport implements Parcelable { dest.writeString(throwFileName); dest.writeString(throwClassName); dest.writeString(throwMethodName); + dest.writeInt(throwLineNumber); dest.writeString(stackTrace); } @@ -214,6 +221,7 @@ public class ApplicationErrorReport implements Parcelable { pw.println(prefix + "throwFileName: " + throwFileName); pw.println(prefix + "throwClassName: " + throwClassName); pw.println(prefix + "throwMethodName: " + throwMethodName); + pw.println(prefix + "throwLineNumber: " + throwLineNumber); pw.println(prefix + "stackTrace: " + stackTrace); } } diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index ec6f636..587eb5d 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -8335,6 +8335,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen report.crashInfo.throwFileName = trace.getFileName(); report.crashInfo.throwClassName = trace.getClassName(); report.crashInfo.throwMethodName = trace.getMethodName(); + report.crashInfo.throwLineNumber = trace.getLineNumber(); } else if (r.notResponding) { report.type = ApplicationErrorReport.TYPE_ANR; report.anrInfo = new ApplicationErrorReport.AnrInfo(); |
