Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize error messages + feedback #36

Open
hakusaro opened this issue Oct 10, 2016 · 2 comments
Open

Standardize error messages + feedback #36

hakusaro opened this issue Oct 10, 2016 · 2 comments

Comments

@hakusaro
Copy link
Member

I think we should standardize error messages and feedback, like what changed in Pryaxis/TShock@c4cf2d4 with /register in TShock.

I think any error message that gets sent to either the console or a player should have not only a clear message, but a reasonable solution attached too.

Bad:

  1. There was a problem with the database. [StackTrace]
  2. A user already exists by that name.
  3. That group does not exist!

Good:

  1. There was a problem with the database. [StackTrace]. To solve: make sure that your database connection information is correct in the config file, and that the database is running. If you're using MySQL, run netstat -tulpn to verify that MySQL is listening on the port you're trying to connect to.
  2. That user account already exists. Try re-registering with a different username.
  3. The group "adminz" doesn't exist. Did you mean "admins"? If you need to, create a new group with [syntax for new group creation].

In other words, error messages should be both informative and actionable. If the error message is something we can't expect someone to solve, we should make it clear that they need to report the issue on the forums or on Github. Look at what Ruby does if Ruby dies:

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html
@kevzhao2
Copy link
Member

In addition, we should be using localized strings from the get-go. However, logging should still be done in English. There's no point localizing logs, IMO.

@QuiCM
Copy link
Member

QuiCM commented Sep 12, 2019

This sounds good, but will require sometime to champion it. Will devs have a service available that provides things like 'good 3.'?
Is someone going to produce a general error reporting standard to be followed inside TS/Orion?
Who will be responsible for ensuring code contributions provide the quality this proposal suggests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants