From what I can tell, that shouldn't ever happen. I'm not sure in JNI,
but I know in Java if you throw a "null", it will instead throw a
NullPointerException, so anyone catching that Throwable will not see a
"null" value, but instead a NullPointerException instance.
In Java, yes. But in JNI, in C, I'd expect it is possible to literally
throw an empty or null pointer.
I'd also expect that any code that did that was sub-par, and not worth
using or debugging.
I'm mildly interested in what the OP is using, mostly so I can avoid it.
However if he can supply some details (*what* are you using, Bob?) I'd
consider taking a loot at it. The actually question he asks: "Is it
common practice," I don't really know or care. It seems bad practice,
but I've never dealt with JNI code, so what do I know?