MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / get_throwable_string

Method get_throwable_string

rust/src/api/mod.rs:1539–1552  ·  view source on GitHub ↗
(
        throwable: jobject,
        jni_env: *mut JNIEnv,
    )

Source from the content-addressed store, hash-verified

1537 }
1538
1539 unsafe fn get_throwable_string(
1540 throwable: jobject,
1541 jni_env: *mut JNIEnv,
1542 ) -> errors::Result<String> {
1543 let java_string = (opt_to_res(cache::get_jni_call_static_object_method())?)(
1544 jni_env,
1545 cache::get_utils_class()?,
1546 cache::get_utils_exception_to_string_method()?,
1547 throwable,
1548 );
1549 let to_ret = jni_utils::string_from_jobject(java_string, jni_env);
1550 jni_utils::delete_java_local_ref(jni_env, java_string);
1551 to_ret
1552 }
1553
1554 // Retrieves a JNIEnv in the case that a JVM is already created even from another thread.
1555 fn get_created_vm() -> Option<*mut JNIEnv> {

Callers

nothing calls this directly

Calls 6

opt_to_resFunction · 0.85
get_utils_classFunction · 0.85
string_from_jobjectFunction · 0.85
delete_java_local_refFunction · 0.85

Tested by

no test coverage detected