On 6 Sep 2005 09:59:07 -0700,
wrote or quoted :
> pEnv->ThrowNew(clsException, "HelloWorld");
Insert this after the Throw:
pEnv->DeleteLocalRef( clsException );
Your problem basically is that C++ knows nothing about Java
exceptions. Exceptions are just control blocks lying about. It is up
to you in some C++ish way, after you set up the exception, return
quickly and gracefully up the call stack to your caller back in Java
who can then handle the exception. On your way back, C++ can handle or
notice the exception by explicitly testing for it with ExceptionCheck.
In Abundance this is known as a "graceful bailout".
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.