Skip to content

Commit

Permalink
docs: put .jclass() in example expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
alemidev committed Sep 24, 2024
1 parent 4d2debf commit 9160772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub extern "system" fn Java_mp_code_Client_connect<'local>(
let config_new = match jni_toolbox::from_java_static::<Config>(&mut env, config) {
Ok(x) => x,
Err(e) => {
let _ = env.throw_new("java/lang/RuntimeException", format!("{e:?}"));
let _ = env.throw_new(e.jclass(), format!("{e:?}"));
return std::ptr::null_mut();
}
};
Expand All @@ -111,7 +111,7 @@ pub extern "system" fn Java_mp_code_Client_connect<'local>(
match ret.into_java(&mut env) {
Ok(fin) => fin,
Err(e) => {
let _ = env.throw_new("java/lang/RuntimeException", format!("{e:?}"));
let _ = env.throw_new(e.jclass(), format!("{e:?}"));
std::ptr::null_mut()
}
}
Expand Down

0 comments on commit 9160772

Please sign in to comment.