Skip to content

1.2.0

Choose a tag to compare

@Jeehut Jeehut released this 04 Jun 07:45
· 5 commits to main since this release

String Interpolation Convenience

ErrorKit now provides convenient string interpolation for errors, making it effortless to display user-friendly messages and debug error chains.

User-Friendly Error Messages

// Instead of:
showAlert(message: "Save failed: \(ErrorKit.userFriendlyMessage(for: error))")

// You can now simply use:
showAlert(message: "Save failed: \(error)")
Text("Could not load data: \(error)")

If you were using this kind of interpolation for errors, you get improved error messages just by adding ErrorKit to your project without any changes needed! 🥳

Error Chain Debugging

// Instead of:
print("Update failed: \(ErrorKit.errorChainDescription(for: error))")

// You can now use either:
print("Update failed:\n\(chain: error)")
print("Update failed:\n\(debug: error)")

Both chain: and debug: are aliases — use whichever feels more natural to you.


What's Changed

New Contributors

Full Changelog: 1.1.0...1.2.0