| 22 | namespace jni::details |
| 23 | { |
| 24 | void 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 |
no outgoing calls
no test coverage detected