internal void DeleteLocalRef(JniLocalHandle lref) { if (JniLocalHandle.IsNull(lref)) { throw new ArgumentNullException("lref"); } deleteLocalRef(envPtr, lref); //optimized away ExceptionTest(); }
public JniGlobalHandle NewGlobalRef(JniHandle lobj) { if (JniLocalHandle.IsNull(lobj)) { throw new ArgumentNullException("lobj"); } JniGlobalHandleNs res = newGlobalRef(envPtr, lobj); return(new JniGlobalHandle(res.handle, GetJavaVM())); }
public void ExceptionTest() { JniLocalHandle occurred = ExceptionOccurred(); if (!JniLocalHandle.IsNull(occurred)) { ExceptionDescribe(); ExceptionClear(); throw new Exception("fail in exception test. need to use typed exception"); //Exception exception = Convertor.FullJ2C<Exception>(this, occurred); //throw exception; } }
public bool ExceptionRead() { JniLocalHandle occurred = ExceptionOccurred(); if (!JniLocalHandle.IsNull(occurred)) { #if DEBUG ExceptionDescribe(); #endif ExceptionClear(); return(true); } return(false); }