Use try catch for complete activity
<p>I know it's not proper programming but I wan't to trie it anyway. I wan't a whole activity to be put in try catch.</p>

<p>So I tried the following: Put all code and function calls in onCreate in try catch. But still it isn't caught. How can I do this? Maybe make the whole activity class throwable or something?</p>

<p>edit: logcat console added</p>

<pre><code>05-12 10:41:10.996: ERROR/AndroidRuntime(27442): FATAL EXCEPTION: main
05-12 10:41:10.996: ERROR/AndroidRuntime(27442): java.lang.IllegalArgumentException: Receiver not registered: android.widget.ZoomButtonsController$1@476ffb30
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:859)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:863)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:404)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.widget.ZoomButtonsController$2.handleMessage(ZoomButtonsController.java:178)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.os.Looper.loop(Looper.java:143)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at android.app.ActivityThread.main(ActivityThread.java:5068)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at java.lang.reflect.Method.invokeNative(Native Method)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at java.lang.reflect.Method.invoke(Method.java:521)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-12 10:41:10.996: ERROR/AndroidRuntime(27442):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>
