mirror of
https://github.com/oxen-io/session-android.git
synced 2025-05-03 22:41:34 +00:00
Formatted message
This commit is contained in:
parent
036b13084f
commit
c899d723b7
@ -40,9 +40,10 @@ namespace jni_utils {
|
|||||||
return run_catching_cxx_exception_or<RetT>(f, [env](const char *msg) {
|
return run_catching_cxx_exception_or<RetT>(f, [env](const char *msg) {
|
||||||
jclass exceptionClass = env->FindClass("java/lang/RuntimeException");
|
jclass exceptionClass = env->FindClass("java/lang/RuntimeException");
|
||||||
if (msg) {
|
if (msg) {
|
||||||
env->ThrowNew(exceptionClass, msg);
|
auto formatted_message = std::string("libsession: C++ exception: ") + msg;
|
||||||
|
env->ThrowNew(exceptionClass, formatted_message.c_str());
|
||||||
} else {
|
} else {
|
||||||
env->ThrowNew(exceptionClass, "Unknown C++ exception from libsession");
|
env->ThrowNew(exceptionClass, "libsession: Unknown C++ exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
return RetT();
|
return RetT();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user