alef 0.62.5

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
                java.util.List<Throwable> cleanupFailures = new java.util.ArrayList<>();
                try {
                    NativeLib.{{ pu }}_VISITOR_FREE.invoke(visitorHandle);
                } catch (Throwable failure) {
                    cleanupFailures.add(failure);
                }
                try {
                    bridge.rethrowVisitorError();
                } catch (Throwable failure) {
                    cleanupFailures.add(failure);
                }
                if (!cleanupFailures.isEmpty()) {
                    RuntimeException aggregate = new RuntimeException("Visitor cleanup failed");
                    cleanupFailures.forEach(aggregate::addSuppressed);
                    if (operationFailure != null) operationFailure.addSuppressed(aggregate);
                    else throw aggregate;
                }
            }