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 error message when passed unsupported type #369

Merged
merged 2 commits into from Dec 17, 2015

Conversation

codeodor
Copy link

I'm not sure that is the best message, but I think the message needs improving, so I wanted to open a discussion about this.

If the message as I changed it makes sense in the context of all the different ways in which unsupported might be called, then I suppose maybe it's OK as-is. But it looked like maybe there's a better way to say it.

Basically, when upgrading some code that was failing after having worked with a String, it took me quite a while to figure out what this "unsupported: String" message was about, and to do so, I had to read through Arel's code. So I thought it would be better to give the other programmer some direction to where they wouldn't need to do that.

It would be even better if we could point them to a specific section of the docs that addresses how to work in Arel.

What do you think?

@tenderlove
Copy link
Member

Seems fine to me. Maybe we should add a specific exception instead of just raising a runtime exception?

@codeodor
Copy link
Author

@tenderlove I added another commit 145f32a for that. Is it what you had in mind?

rafaelfranca added a commit that referenced this pull request Dec 17, 2015
Improve error message when passed unsupported type
@rafaelfranca rafaelfranca merged commit 746e3ad into rails:master Dec 17, 2015
@codeodor
Copy link
Author

❤️

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

Successfully merging this pull request may close these issues.

None yet

3 participants