Back to index

lightning-sunbird  0.9+nobinonly
ExceptionOccured_1.cpp File Reference
#include "JNIEnvTests.h"
#include "Exceptions.h"

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_ExceptionOccurred_1)

Function Documentation

JNI_OJIAPITest ( JNIEnv_ExceptionOccurred_1  )

Definition at line 40 of file ExceptionOccured_1.cpp.


  jclass clazz = env->FindClass("Ljava/lang/ArrayIndexOutOfBoundsException;");
  jthrowable obj = (jthrowable)env->AllocObject(clazz);
  jint res = env->Throw(obj);
  jthrowable excep  = env->ExceptionOccurred();
  if(env->IsInstanceOf(excep, clazz)){
    return TestResult::PASS("ExceptionOccurred(exception being thrown) is correct");
    return TestResult::FAIL("ExceptionOccurred(exception being thrown) does not correct");

Here is the call graph for this function: