IllegalArgumentException not catched
<p>A very strange error...I register and unregister a receiver in the onResume() and onPause() methods. Here is the code in the onStop() method:</p>

<pre><code>    try{
        this.unregisterReceiver(this.sdCardReceiver);
    }catch(IllegalArgumentException e){
        Log.d(MyOwnLife.LOG_LIFEGALLERY, "ActivityVideo - onStop unregisterReceiver:"+e);
    }
</code></pre>

<p>And I get the following error:</p>

<pre><code>Caused by: java.lang.IllegalArgumentException: Receiver not registered: myownlife.pigeau.activityVideo.ActivityVideo$SdCardReceiver@405443f8
</code></pre>

<p>I catch the error...but my application crashes anyway...any idea ?</p>

<p>Here is the full log:</p>

<pre><code>    java.lang.RuntimeException: Unable to stop activity {myownlife.pigeau/myownlife.pigeau.activityVideo.ActivityVideo}: java.lang.IllegalArgumentException: Receiver not registered: myownlife.pigeau.activityVideo.ActivityVideo$SdCardReceiver@405443f8
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:2434)
at android.app.ActivityThread.handleWindowVisibility(ActivityThread.java:2506)
at android.app.ActivityThread.access$1900(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: myownlife.pigeau.activityVideo.ActivityVideo$SdCardReceiver@405443f8
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:610)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:851)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:342)
at myownlife.pigeau.activityVideo.ActivityVideo.onStop(ActivityVideo.java:224)
at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1170)
at android.app.Activity.performStop(Activity.java:3884)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:2431)
... 11 more
</code></pre>
