mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-23 00:17: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) {
|
||||
jclass exceptionClass = env->FindClass("java/lang/RuntimeException");
|
||||
if (msg) {
|
||||
env->ThrowNew(exceptionClass, msg);
|
||||
auto formatted_message = std::string("libsession: C++ exception: ") + msg;
|
||||
env->ThrowNew(exceptionClass, formatted_message.c_str());
|
||||
} else {
|
||||
env->ThrowNew(exceptionClass, "Unknown C++ exception from libsession");
|
||||
env->ThrowNew(exceptionClass, "libsession: Unknown C++ exception");
|
||||
}
|
||||
|
||||
return RetT();
|
||||
|
Loading…
x
Reference in New Issue
Block a user