buttplugio / buttplug-rs-ffi

FFI from buttplug-rs to Java and other languages
Other
88 stars 22 forks source link

Move exception catch for missing natives #99

Open kitlith opened 1 year ago

kitlith commented 1 year ago

This should make the "missing natives" exception more visible, since it'll be closer to the top of the stack.

Also added some handling for setting up a log handler.

while I was working on this, I noticed callback = (ctx, str) -> cb.log(str);, which is not a static callback like most/every other callback in this library. i should probably fix that at some point.

kitlith commented 1 year ago

hm. looks like CI partially broke.

kitlith commented 1 year ago

thought: should i change the message from "missing natives" to "failed to load natives"?

qdot commented 1 year ago

That's probably a little clearer yeah.