-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
The root finder traits in lox_math::roots currently assume that the callbacks (the functions whose roots should be computed) are infallible. This assumption does not hold when used from Python because Python has exceptions and every Python function is allowed to throw at any time.
The workaround that is currently in use is dangerous because it silently swallows errors from Python callbacks: https://github.com/lox-space/lox/blob/main/crates/lox-orbits/src/python.rs#L379
On the Rust side, we need to change the traits to support e.g. a CallbackError variant and then pass through the PyErr from Python in the wrapper.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers