gtk-rs-core icon indicating copy to clipboard operation
gtk-rs-core copied to clipboard

Reduce usage of BoolError for manual code

Open sdroege opened this issue 4 years ago • 6 comments

We have quite some manual code where we currently use BoolError although there are multiple, proper error cases. For example ObjectExt::set_property() or all the signals related functions.

I would suggest to replace these all with proper error types.

@GuillaumeGomez @EPashkin opinions?

sdroege avatar Aug 09 '19 06:08 sdroege

Same as in the PR discussion: I agree on using more accurate types instead.

GuillaumeGomez avatar Aug 09 '19 08:08 GuillaumeGomez

I also agree that concrete type is better

EPashkin avatar Aug 09 '19 16:08 EPashkin

@sdroege the idea is to replace BoolError with more specific errors for the various domain/cases? Similar to value::GetError, for other types?

elmarco avatar Apr 10 '21 20:04 elmarco

Yes, where it makes sense at least.

sdroege avatar Apr 11 '21 07:04 sdroege

What about public functions that return BoolError? Should we just switch to a different type? Should BoolError wrap the specific type?

elmarco avatar Apr 11 '21 16:04 elmarco

I don't know. It requires proper design work for each of the cases.

sdroege avatar Apr 11 '21 16:04 sdroege