x/ref: Avoid JNI DETECTED ERROR IN APPLICATION error

I noticed that if I try to return a non-primitive object during an
exception (such as during SyncgroupJoin) that the jni would crash.

This error seems to imply that we have to wait for Java to handle
the exception OR clear the exception OR just return early (with null).

I opted for returning early. The JNI functions that return errors and
primitives remain as-is since the latter can't be nil'd.

Change-Id: If7d88ee72cead5a6f0c0d38061a2f309570089d3
1 file changed
tree: 2ba43148d53d8bf2328cffad8c25a18ab9573b52
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.