diff options
| author | Charles Munger <clm@google.com> | 2020-03-24 19:03:20 +0000 |
|---|---|---|
| committer | Charles Munger <clm@google.com> | 2020-04-02 20:25:22 +0000 |
| commit | 368949c23a557f1cadb368debd13adafec667fbc (patch) | |
| tree | 03e02c1e89b26bce00253f76d0f158c8ee862b18 /core/java/android/os/Parcel.java | |
| parent | abc516b9f9d46fa1c8b2e033f545cea6ffba6b79 (diff) | |
Include exception as cause of BadParcelableException
Bug: 136208613
Test: Improved error message
Change-Id: I31404ef67f3b3c8788bd5b83ac5db94279f50f7c
Diffstat (limited to 'core/java/android/os/Parcel.java')
| -rw-r--r-- | core/java/android/os/Parcel.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index 382c838447b2..c17eafd735fe 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -3044,15 +3044,15 @@ public final class Parcel { } catch (IllegalAccessException e) { Log.e(TAG, "Illegal access when unmarshalling: " + name, e); throw new BadParcelableException( - "IllegalAccessException when unmarshalling: " + name); + "IllegalAccessException when unmarshalling: " + name, e); } catch (ClassNotFoundException e) { Log.e(TAG, "Class not found when unmarshalling: " + name, e); throw new BadParcelableException( - "ClassNotFoundException when unmarshalling: " + name); + "ClassNotFoundException when unmarshalling: " + name, e); } catch (NoSuchFieldException e) { throw new BadParcelableException("Parcelable protocol requires a " + "Parcelable.Creator object called " - + "CREATOR on class " + name); + + "CREATOR on class " + name, e); } if (creator == null) { throw new BadParcelableException("Parcelable protocol requires a " |
