jtry: Wrap an R expression which calls rJava functions.

Description Usage Arguments Value

Description

Execute the given expression and check for a Java exception afterwards. If an exception was found throw an error. Make sure that the expression, which is usually a .jcall or a .jnew function, is called with the check = FALSE option. Otherwise the exception is cleared before jtry checks for its existance.

Usage

1
jtry(expression, onError = jstop, ...)

Arguments

expression

a valid R expression, usually a call to .jcall or .jnew

onError

the callback which will be called if a java exception was thrown with the exception as the first argument

...

any further arguments to the onError function

Value

the result of the expression


hoesler/dbj documentation built on May 17, 2019, 4:36 p.m.