rust-bitcoin / rust-bitcoin

Rust Bitcoin library
Creative Commons Zero v1.0 Universal
2.16k stars 699 forks source link

Inconsistent error names #3644

Open tcharding opened 1 week ago

tcharding commented 1 week ago

The PsbtParseError and ParseAmountError are inconsistent names. We have many other parsing errors and they are typically called ParseError then users can use one level of path to qualify if they wish e.g., psbt::ParseError would be more consistent.

apoelstra commented 1 week ago

Yeah, we could change these ones. But I don't think in general we can do this -- e.g. I would expect the PSBT module to have multiple kinds of parse errors. In rust-minscript we definitely have this situation.

I also don't really think this matters ... if you are explicitly naming errors in your code then you need to be reading through docs anyway because they're named inconsistently throughout the entire ecosystem. But if you want to make this change, I'm cool with it.

tcharding commented 6 days ago

No worries, thanks.