# we try to create a bogus object and
# instruct .jnew to not clear the exception
v <- .jnew("foo/bar", check=FALSE)
# expect TRUE result here because the class doesn't exist
print(.jcheck(silent=TRUE))
# next invocation will be FALSE because the exception is now cleared
print(.jcheck(silent=TRUE))
Run the code above in your browser using DataLab