fontdue icon indicating copy to clipboard operation
fontdue copied to clipboard

Replace `&'static str` errors with a dedicated `FontError` type

Open jwodder opened this issue 1 month ago • 0 comments

Using &'static strs for error is bad API design, as it makes it hard for calling code to determine what type of error has happened without becoming dependent on exact strings, and also because &'static str doesn't implement std::error::Error. This PR replaces the &'static str errors with a dedicated FontError type.

If you don't want thiserror added as a dependency for some reason, I can amend the PR to implement the relevant traits manually instead.

jwodder avatar Nov 18 '25 22:11 jwodder