internal static Exception GetExceptionForLastThrowable()
        {
            IntPtr e = JNIEnv.ExceptionOccurred();

            if (e == IntPtr.Zero)
            {
                return(null);
            }
            JNIEnv.ExceptionClear();
            return(HandleToException(e));
        }