Skip to content

Add error code documentation to CLI help text #115

Description

@SickleFire

Problem

Currently, users who encounter errors running m-vis commands need to search through code or issues to understand what an error means. The CLI does not provide clear documentation of common error codes and their solutions.

Proposed Solution

Create a comprehensive error code reference in the help system. This should:

  1. Document all error codes that m-vis can produce (e.g., permission denied, process not found, invalid argument)
  2. Add context and solutions for each error to help users troubleshoot issues
  3. Integrate into CLI help via a new mvis help errors command or add to existing --help output
  4. Update the man page (doc/mvis.1) with a new ERRORS section listing common error codes

Scope

  • Identify all unique error types in src/utils/error.rs and other modules
  • Create a mapping of error codes → description → troubleshooting steps
  • Add a new help handler function print_help_errors() in src/main.rs
  • Integrate mvis help errors command routing in the CLI parser
  • Update doc/mvis.1 with a .SH ERRORS section following roff man page conventions
  • Add 2-3 examples showing common error scenarios and solutions

Why This Helps

  • Improves UX: New users won't be confused by cryptic error messages
  • Reduces support burden: Self-service troubleshooting
  • Cross-platform consistency: Windows, Linux, and macOS error handling documented in one place
  • Good learning opportunity: Touches CLI, documentation, and error handling without requiring deep systems knowledge

Acceptance Criteria

  • mvis help errors displays a formatted list of error codes
  • Each error code includes: name, description, likely causes, and solution
  • Man page includes .SH ERRORS section with at least 5 common error codes
  • Changes tested on at least one platform (Windows/Linux/macOS)

Resources

  • Error types: src/utils/error.rs
  • Current help functions: src/main.rs (search for print_help_*)
  • Man page format: doc/mvis.1 (check EXAMPLES and DESCRIPTION sections)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions