Standardise error handling #57
Labels
No labels
Forge
ForgeJo
Forge
GitHub
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/TUI
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: kemitix/git-next#57
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ref: Rust Error Handling - Best Practices
(Jeremy Chone )
Error
type for modules that require them.Don't create an
error
module.The
my_module::Error
should be anenum
.As a sibling to the
enum Error
create aResult
type:For tests, can use an error type:
Look at crate
derive_more
, to allow use of:Use struct for
enum
variantes:Example template:
Define Result and Error withing tests module: