arcnmx / wireplumber.rs

wireplumber rust bindings
https://arcnmx.github.io/wireplumber.rs/main/wireplumber/
MIT License
21 stars 3 forks source link

Improve/standardize error messages and types #11

Open arcnmx opened 1 year ago

arcnmx commented 1 year ago

Use const str messages all defined in the error mod. Can I define my own error codes or are we stuck with the existing wp ones? Use a new wp.rs domain to differentiate maybe? Another option is to create an explicit crate-local Error enum that wraps glib::Error.

grep for Error::new to find existing failure cases... maybe also look for unwrap/expect usage too. at the same time maybe go over any log messages if they exist?

In some cases related to gir, [object.function.return] nullable_return_is_error could also be helpful? It doesn't seem to offer much customization beyond a message though? :disappointed: