MethodHandles.CatchException(MethodHandle, Class, MethodHandle) 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.
Makes a method handle which adapts a target method handle, by running it inside an exception handler.
[Android.Runtime.Register("catchException", "(Ljava/lang/invoke/MethodHandle;Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)]
public static Java.Lang.Invoke.MethodHandle? CatchException (Java.Lang.Invoke.MethodHandle? target, Java.Lang.Class? exType, Java.Lang.Invoke.MethodHandle? handler);
[<Android.Runtime.Register("catchException", "(Ljava/lang/invoke/MethodHandle;Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)>]
static member CatchException : Java.Lang.Invoke.MethodHandle * Java.Lang.Class * Java.Lang.Invoke.MethodHandle -> Java.Lang.Invoke.MethodHandle
Parameters
- target
- MethodHandle
method handle to call
- exType
- Class
the type of exception which the handler will catch
- handler
- MethodHandle
method handle to call if a matching exception is thrown
Returns
method handle which incorporates the specified try/catch logic
- Attributes
Remarks
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.