message: Refine JNI exception when tensor allocation fails
diff: @@ -152,8 +152,9 @@ Java_org_tensorflow_lite_NativeInterpreterWrapper_allocateTensors(
  if (error_reporter == nullptr) return;
  if (interpreter->AllocateTensors() != kTfLiteOk) {
  - throwException(env, kNullPointerException,
  - "Internal error: Cannot allocate memory for the interpreter:"
  + throwException(
  + env, kIllegalStateException,
  + "Internal error: Unexpected failure when preparing tensor allocations:"
  " %s",
  error_reporter->CachedErrorMessage());
  }
  @@ -336,8 +337,9 @@ Java_org_tensorflow_lite_NativeInterpreterWrapper_createInterpreter(
  // allocates memory
  status = interpreter->AllocateTensors();
  if (status != kTfLiteOk) {
  - throwException(env, kNullPointerException,
  - "Internal error: Cannot allocate memory for the interpreter:"
  + throwException(
  + env, kIllegalStateException,
  + "Internal error: Unexpected failure when preparing tensor allocations:"
  " %s",
  error_reporter->CachedErrorMessage());
  return 0;
  