Pass an Exception as a Parcel
<p>I am trying to pass an exception to an activity meant to dump the relevant information to the screen.</p>

<p>Currently I pass it through a bundle:</p>

<pre><code>try {
    this.listPackageActivities();
} catch (Exception e) {
    Intent intent = new Intent().setClass(this, ExceptionActivity.class).putExtra("Exception", e);
    startActivity(intent);
}
</code></pre>

<p>But when it gets there:</p>

<pre><code>if (!(this.bundle.getParcelable("Exception") != null))
    throw new IndexOutOfBoundsException("Index \"Exception\" does not exist in  the parcel." + "/n"
    + "Keys: " + this.bundle.keySet().toString());
</code></pre>

<p>This sweet exception is thrown but when I look at the keySet and the bundle details it tells me that there is one parcelable object with a key named "Exception".</p>

<p>I understand that this has something to do with types but I do not understand what I am doing wrong. I just want to dump information about an exception, any exception to the screen. Is there a way to do that without having to condense all the information into a string every time?</p>
