jextract-25 early-access build (25-jextract+2-4) on JDK 25.0.5+8 against SQLite 3.45.1: 25 functions and 13 constants generated into 4 committed files (the whole header would be 83 files), a small Db wrapper, the four arena kinds used wrongly on purpose, ADDRESS vs C_POINTER zero-length vs unbounded segments and the SIGSEGV from getString on a NULL pointer, sqlite3_open out-parameter, return codes to exceptions, a sqlite3_exec upcall and the VM exit when it throws, the JDK 25 native-access warning and --illegal-native-access=deny, library loading failures, and a JMH benchmark of FFM vs hand-written JNI vs plain Java (indicative only: shared 2-CPU machine). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6Kg9RWSTJzyz6KP9X
9 lines
509 B
Plaintext
9 lines
509 B
Plaintext
$ java --enable-native-access=ALL-UNNAMED -cp build/classes demo.Errors
|
|
open in a directory that does not exist -> unable to open database file (rc=14)
|
|
open a missing file read-only -> unable to open database file (rc=14)
|
|
syntax error -> near "SELEC": syntax error (rc=1)
|
|
missing table -> no such table: ghost (rc=1)
|
|
NOT NULL violation -> NOT NULL constraint failed: t.name (rc=19)
|
|
PRIMARY KEY violation -> UNIQUE constraint failed: t.id (rc=19)
|
|
SQLITE_CONSTRAINT = 19, sqlite3_errstr(19) = constraint failed
|