BeamMP-Server icon indicating copy to clipboard operation
BeamMP-Server copied to clipboard

Use user-/idiot-friendly error messages in `settings` command

Open lionkor opened this issue 7 months ago • 0 comments

Currently, mistyping settings could confuse users who mistype settings.

Acceptance criteria

  • [ ] Use simple language to convey what the error is, for example "unknown setting", "unknown category" (or similar) when users use an invalid category or setting.
  • [ ] Hint at possible errors using language such as "Maybe it was spelled wrong", "use settings list to get a list of all valid settings", "setting names are case sensitive", bla.

Notes:

  • It's probably easiest to swap logic/runtime error types for custom exception types and then catch them via a } catch (InvalidCategory e) {...} catch (InvalidKey e) { ... } ... etc.
  • You can write a grammar for the settings, using e.g. boost::spirit

lionkor avatar Jun 26 '24 11:06 lionkor