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:
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-localError
enum that wrapsglib::Error
.grep for
Error::new
to find existing failure cases... maybe also look forunwrap
/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: