SIGN IN SIGN UP

jni: return QueryResult to Java even when C API returns LbugError

When lbug_connection_query / lbug_connection_execute returns LbugError
but _query_result is non-null, the query was executed and failed
logically (binder error, type error, timeout, etc.). Previously the JNI
deleted the result and threw a generic 'Failed to execute query'
exception, losing the actual error message.

Now we only treat it as an infrastructure error (throw) when
_query_result is null. Otherwise we return the QueryResult to Java so
callers can use isSuccess() / getErrorMessage() as expected.

The C API contract (LbugError for logically-failed queries) is
unchanged, keeping CApiConnectionTest green.
A
Arun Sharma committed
5a9e7ac32992393a59cb9601fcf381dc06408810
Parent: da47fd3
Committed by adsharma <658691+adsharma@users.noreply.github.com> on 3/31/2026, 11:26:28 PM