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

Improve chord build errors #62

Open
gsouf opened this issue Dec 31, 2014 · 2 comments
Open

Improve chord build errors #62

gsouf opened this issue Dec 31, 2014 · 2 comments

Comments

@gsouf
Copy link

gsouf commented Dec 31, 2014

Hi,

I have a work in progress where user can type their one chord, and this goes to the chord builder. It's very straightforward because the chord parser does the analysis of the user input for me.

My goal today it to display error to the user in his language. I could translate the error message that the library return, but it is definitively a bad solution (and moreover the error returned contains some variables).

I have though about 2 obvious way to fix it (and both can be implemented together).

  • 1 - add a translation to the library that we can pass globaly to teoria at the runtime, and we can return already translated messages to the user
  • 2 - throw a different exception for each error : this would be very helpful. It will allow to know what is going wrong before telling the user it's wrong. Then we can adapt the action we want the user to achieve to fix it.

obviously, we can mix both solution and throw different exception with translated message.

@saebekassebil
Copy link
Owner

Hi @SneakyBobito,

We should definitely go for option 2. We could do this by returning/throwing an error with a constant error symbol.

I'll look into this, if you don't want to?

@gsouf
Copy link
Author

gsouf commented Jan 9, 2015

I can do it for sure. Just give me a few time.

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

2 participants