Prompt
Create user-friendly error messages that guide developers toward solutions. Error messages should:
- Include the problematic value in the message
- Provide clear suggestions for fixing the issue
- Avoid duplicate errors for the same problem
- Use help/note sections for additional context
Example:
// Instead of:
early_dcx.early_warn("option `-o` has no space between flag name and value");
// Do this:
early_dcx.early_warn(
"option `-o` has no space between flag name and value, which can be confusing"
);
early_dcx.early_help(
format!("insert a space between `-o` and `{name}` if this is intentional: `-o {name}`")
);
The error message should clearly identify the issue, show the problematic value, and provide actionable guidance for resolution. Use help/note sections to separate the error description from suggestions and additional context.