MCPcopy Create free account
hub / github.com/WiVRn/WiVRn / handle_java_exception

Function handle_java_exception

client/android/jnipp.cpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace jni::details
23{
24void handle_java_exception()
25{
26 auto & env = jni_thread::env();
27 if (auto exc = env.ExceptionOccurred())
28 {
29 env.ExceptionClear();
30
31 std::string str = object<"java/lang/Object">{exc}.call<jni::string>("toString");
32
33 throw std::runtime_error("Java exception " + str);
34 }
35}
36} // namespace jni::details

Callers 3

callMethod · 0.85
callMethod · 0.85
new_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected