mirror of
https://github.com/hexedtech/jni-toolbox.git
synced 2024-12-22 13:24:53 +01:00
docs: put .jclass() in example expansion
This commit is contained in:
parent
4d2debf789
commit
9160772fd4
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue