Instrumentation.OnException(Object, Throwable) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This is called whenever the system captures an unhandled exception that was thrown by the application.
[Android.Runtime.Register("onException", "(Ljava/lang/Object;Ljava/lang/Throwable;)Z", "GetOnException_Ljava_lang_Object_Ljava_lang_Throwable_Handler")]
public virtual bool OnException (Java.Lang.Object? obj, Java.Lang.Throwable? e);
[<Android.Runtime.Register("onException", "(Ljava/lang/Object;Ljava/lang/Throwable;)Z", "GetOnException_Ljava_lang_Object_Ljava_lang_Throwable_Handler")>]
abstract member OnException : Java.Lang.Object * Java.Lang.Throwable -> bool
override this.OnException : Java.Lang.Object * Java.Lang.Throwable -> bool
Parameters
- obj
- Object
The client object that generated the exception. May be an Application, Activity, BroadcastReceiver, Service, or null.
The exception that was thrown.
Returns
To allow normal system exception process to occur, return false. If true is returned, the system will proceed as if the exception didn't happen.
- Attributes
Remarks
This is called whenever the system captures an unhandled exception that was thrown by the application. The default implementation simply returns false, allowing normal system handling of the exception to take place.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.