mullvad / windows-service-rs

Windows services in Rust
Apache License 2.0
525 stars 85 forks source link

Manual error implementation with less variants #94

Closed citreae535 closed 1 year ago

citreae535 commented 1 year ago

As discussed in #92.


This change is Reviewable

faern commented 1 year ago

I'm all for removing the error helper libraries from the dependency tree. I'm not 100% convinced these are the best error variant formats. They still expose the internal details of each variant and it's going to be a breaking change to make any change to the error enum. But it's at least not worse than before. I don't know how people consume this crate actually match on errors, but you might be correct that no one match on the exact arguments having null in them. However, if you were writing a GUI or whatever that allows you to control services, knowing which field had an error in it could potentially help with reporting the error back to the user in a better way. But this might be overthinking it.

We can probably merge this.