Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_ExceptionOccurred_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_ExceptionOccurred_2  )

Definition at line 40 of file ExceptionOccured_2.cpp.

{
  GET_JNI_FOR_TEST

  jclass clazz = env->FindClass("Ljava/lang/ArrayIndexOutOfBoundsException;");
  jthrowable obj = (jthrowable)env->AllocObject(clazz);
 
  jthrowable excep  = env->ExceptionOccurred();
  if(excep==NULL){
    return TestResult::PASS("ExceptionOccurred(no exception being thrown) is correct");
  }else{
    return TestResult::FAIL("ExceptionOccurred(no exception being thrown) does not correct");
  }
}

Here is the call graph for this function: