Skip to content
Snippets Groups Projects
Commit c7bf4131 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

jni: print exception message properly

Change-Id: Ib623f8b1cd90f0cfac28409da72e992de9d11548
parent 770f6efb
Branches
Tags
No related merge requests found
......@@ -56,13 +56,13 @@
%typemap(throws, throws="java.lang.IllegalArgumentException") std::invalid_argument {
jclass excep = jenv->FindClass("java/lang/IllegalArgumentException");
if (excep)
jenv->ThrowNew(excep, $1.what().c_str());
jenv->ThrowNew(excep, $1.what());
return $null;
}
%typemap(throws, throws="java.lang.IllegalStateException") std::runtime_error {
jclass excep = jenv->FindClass("java/lang/IllegalStateException");
if (excep)
jenv->ThrowNew(excep, $1.what().c_str());
jenv->ThrowNew(excep, $1.what());
return $null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment