title: JNI, cast between jobect and jthrowable
body: <p>I need raise an exception from C++ code. Raised exception must contain text and code of error. 
  So common form:</p>
  
  <pre><code>ThrowNew(jclass clazz, const char *msg)
  </code></pre>
  
  <p>is not applicable. That is why I want create my own instance of java class:</p>
  
  <pre><code>public class MyException extends Exception
  </code></pre>
  
  <p>that contains one more property for code. But JNI interface has only declaration for </p>
  
  <pre><code>Throw(jthrowable obj)
  </code></pre>
  
  <p>Is it correct to cast instance of MyException to jthrowable ?</p>