-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
✨ enhacementenhacement proposalenhacement proposal
Description
Error: A section that will be displayed when there's an irrecoverable error. Once this section is active, the app will show the error and wait for the user to quit the app. This is the only section that might never be active, but it's important to have it in the flow of the app, so that the app can handle errors gracefully.
Extracted from:
coco/coco/src/view/main_component.rs
Lines 38 to 50 in 7f4ce1e
| /// TODO: implement the Loading and Error components and logic: | |
| /// There are three main children components: | |
| /// - `Loading`: A component that will be displayed when the app is starting. This component | |
| /// will be the first to be active and it will just show a loading message or spinner (or | |
| /// nothing). It will be active until the git repo status is checked and the config files have | |
| /// been read and loaded. | |
| /// - `AppRouter`: The main section of the application, where we will be able to interact with | |
| /// the app. This will route between the different main sections of the app and will shouw the | |
| /// forms and info to be able to build our conventional commits. | |
| /// - `Error`: A section that will be displayed when there's an irrecoverable error. Once | |
| /// this section is active, the app will show the error and wait for the user to quit the app. | |
| /// This is the only section that might never be active, but it's important to have it in the | |
| /// flow of the app, so that the app can handle errors gracefully. |
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 valueExtracted from:
coco/coco/src/view/app_router.rs
Lines 88 to 94 in 1d74e05
| // TODO: handle errors better | |
| // display errors when they happen. Not only for committing but for all, including | |
| // any possible panics that might occur. | |
| // | |
| // Maybe using (human-panic)[https://ratatui.rs/recipes/apps/better-panic/] or | |
| // some kind of custom hook to catch panics and display them to the user in | |
| // our own way? |
Metadata
Metadata
Assignees
Labels
✨ enhacementenhacement proposalenhacement proposal