35 env->ThrowNew(env->FindClass(
"org/direct_bt/BTException"), e.
what());
63 }
catch (
const std::bad_alloc &e) {
65 }
catch (
const std::runtime_error &e) {
67 }
catch (
const std::invalid_argument &e) {
69 }
catch (
const std::exception &e) {
71 }
catch (
const std::string &msg) {
73 env->ThrowNew(env->FindClass(
"java/lang/Error"), msg.c_str());
74 }
catch (
const char *msg) {
76 env->ThrowNew(env->FindClass(
"java/lang/Error"), msg);
const char * what() const noexcept override
void print_native_caught_exception_fwd2java(const jau::OutOfMemoryError &e, const char *file, int line)
void raise_java_exception(JNIEnv *env, const std::exception &e, const char *file, int line)
static std::string _unknown_exception_type_msg("Unknown exception type")
void rethrow_and_raise_java_exception_impl(JNIEnv *env, const char *file, int line)
Re-throw current exception and raise respective java exception using any matching function above.
void raise_java_exception(JNIEnv *env, const direct_bt::BTException &e, const char *file, int line)
Author: Sven Gothel sgothel@jausoft.com Copyright (c) 2020 Gothel Software e.K.