ChicoState / ChicoState/ColorManager
Improve error messaging
- Vorherrschende Sprache
- Dockerfile
- Sterne
- 0
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Currently, the program ignores values that don't meet the following criteria:
* The value must be either 3 or 6 characters long (not in-between)
* The value must be a hexadecimal digit (i.e. 0-9, and A-F, where letter values can be either upper or lower-case)
However, we want to give users specific error messages associated with the corresponding values, to see _why_ values are excluded:
- [ ] When a value's length is invalid, print to the console: `___ ERR_LENGTH: RGB values must be either 3 or 6 characters long` where `___` is replaced with that particular value
- [ ] When a value contains one or more characters that is not a hexademical digit, print to the console: `___ ERR_VALUE: RGB values must be in 0-F range` where `___` is replaced with that particular value
In addition, if no values are provided (i.e. `argc` is below 2), then before the program quits, it should print to the console: `ERR_MISSING: One or more RGB values should be provided as arguments, separated by spaces`
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit der Suche nach der Behandlung von argc und der aktuellen Validierung von Befehlszeilenwerten; das Issue beschreibt die drei erforderlichen Fehlerfälle und die exakten Konsolennachrichten. Als erledigt gilt die Aufgabe, wenn ungültige Längen, nicht hexadezimale Werte und fehlende Argumente jeweils die vorgegebene Ausgabe erzeugen, anstatt stillschweigend ignoriert zu werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- cli
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100