Add example where native function throw excetion to Java.