JNI, cast between jobect and jthrowable
Posted
by Dewfy
on Stack Overflow
See other posts from Stack Overflow
or by Dewfy
Published on 2010-03-16T15:27:52Z
Indexed on
2010/03/16
15:51 UTC
Read the original article
Hit count: 734
Dear colleagues, I need raise an exception from C++ code. Raised exception must contain text and code of error. So common form:
ThrowNew(jclass clazz, const char *msg)
is not applicable. That is why I want create my own instance of java class:
public class MyException extends Exception
that contains one more property for code. But JNI interface has only declaration for
Throw(jthrowable obj)
Is it correct to cast instance of MyException to jthrowable ?
© Stack Overflow or respective owner