lucas-labs / coco

🥥 coco » interactive cli for creating conventional commits.
MIT License
3 stars 0 forks source link

✨ » implement Error Section & handle errors better #3

Open lucas-labs opened 1 month ago

lucas-labs commented 1 month ago

Extracted from:

https://github.com/lucas-labs/coco/blob/7f4ce1ee5829f7c4d91756dc925ddeb2b4f936cd/coco/src/view/main_component.rs#L38-L50

Extracted from #5

Display errors when they happen. Not only for committing but for all, including any possible panics that might occur.

Maybe using human-panic or some kind of custom hook to catch panics and display them to the user in our own way?

A way to make the program panic to see how bad it is right now, we can set a bad config like:

askBody: x  # bad boolean value

Extracted from:

https://github.com/lucas-labs/coco/blob/1d74e057f2481fb1b72858524eec000b6e8cea11/coco/src/view/app_router.rs#L88-L94