Skip to content

✨ » implement Error Section & handle errors better #3

@lucas-labs

Description

@lucas-labs
  • 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:

/// 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 value

Extracted from:

// 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

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions