d3 / d3-transition

Animated transitions for D3 selections.
https://d3js.org/d3-transition
ISC License
224 stars 65 forks source link

More descriptive 'Too late' error message #71

Closed ejb closed 7 years ago

ejb commented 7 years ago

I was confused by the terse 'Too late' error message. I would suggest changing it to this:

You are trying to modify a transition that has already started, or derive a transition from one that has ended

The language is taken from the description in this issue.

mbostock commented 7 years ago

Sorry, but I don’t believe in the efficacy of verbose error messages. My preference is for concise error messages in conjunction with helpful documentation in the README. I’ll make an edit to the README to make the meaning of this error more clear, and you are welcome to submit a pull request to contribute to the README as well. Thank you!

mbostock commented 7 years ago

I’ve tweaked the error messages slightly so that the causing condition is more clear, and I’ve also documented the meaning of these messages in the README.

ejb commented 7 years ago

I appreciate the improvements, even if I disagree on the efficacy of verbose error messages. Would love to hear your reasoning (although I also understand you probably don't have time to write long responses to every pull request!)

SteveEdson commented 7 years ago

I'd also like to know this, if possible.

Sometimes I don't have time / shouldn't have to go searching online to figure out what a error means, especially if the code is able to provide me with a suitable explanation right off the bat.

Additionally, if a developer is offline (unlikely, but possible) at the time, getting the right information would be very difficult.

iaincollins commented 7 years ago

+1 for helpful error messages over concised ones.