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:
- Document all error codes that m-vis can produce (e.g., permission denied, process not found, invalid argument)
- Add context and solutions for each error to help users troubleshoot issues
- Integrate into CLI help via a new
mvis help errors command or add to existing --help output
- Update the man page (
doc/mvis.1) with a new ERRORS section listing common error codes
Scope
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
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)
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:
mvis help errorscommand or add to existing--helpoutputdoc/mvis.1) with a new ERRORS section listing common error codesScope
src/utils/error.rsand other modulesprint_help_errors()insrc/main.rsmvis help errorscommand routing in the CLI parserdoc/mvis.1with a.SH ERRORSsection following roff man page conventionsWhy This Helps
Acceptance Criteria
mvis help errorsdisplays a formatted list of error codes.SH ERRORSsection with at least 5 common error codesResources
src/utils/error.rssrc/main.rs(search forprint_help_*)doc/mvis.1(check EXAMPLES and DESCRIPTION sections)