Better error message for unexpected exceptions.

Bug: 220930052
Test: atest ChecksumsTest
Change-Id: Ie7a664fedfa78cb9f0b5445ec271b9fb2a2f7611
This commit is contained in:
Alex Buynytskyy
2022-02-22 16:48:47 -08:00
parent 7a53fdf6f7
commit 44a8cb1322

View File

@@ -2557,8 +2557,9 @@ public class PackageManagerService extends IPackageManager.Stub
try {
return super.onTransact(code, data, reply, flags);
} catch (RuntimeException e) {
if (!(e instanceof SecurityException) && !(e instanceof IllegalArgumentException)) {
Slog.wtf(TAG, "Package Manager Crash", e);
if (!(e instanceof SecurityException) && !(e instanceof IllegalArgumentException)
&& !(e instanceof ParcelableException)) {
Slog.wtf(TAG, "Package Manager Unexpected Exception", e);
}
throw e;
}