Gracefully fail when possible, panic only if necessary
jackcmay opened this issue · comments
Currently rbpf panics for any error. Instead, where possible fail gracefully and return an error to the user.
This also has implications for the verification function. Its current signature returns a bool but rbpf ignores it and expects the verification function to panic. Part of addressing this issue is to respect the return value and potentially pass a more specific failure code up to the user.
I merged #31, which addresses this point for the default verifier. There are more parts that could use proper error handling, let me know if you intend to work on that before we relase a crate (I will probably not do it myself at the moment), or if this should be left for later.
This one was addressed with #37 right?