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

Brush up errors of ActionDispatch::Routing::Mapper#mount #22371

Merged
merged 1 commit into from
Nov 28, 2015

Conversation

yui-knk
Copy link
Contributor

@yui-knk yui-knk commented Nov 22, 2015

  • Integrate to raise ArgumentError
  • Detailed error message when path is not defined
  • Add a test case, invalid rack app is passed

@rails-bot
Copy link

r? @arthurnn

(@rails-bot has picked a reviewer for you, use r? to override)

else
unless Hash === app
raise ArgumentError, "must be called with mount point"
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before we were short-cutting(raising) earlier. Cant we still do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This short-cut did not validate app is callable when mapper.mount 10, as: "exciting".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i missed that it was a unless and now a if

* Integrate to raise `ArgumentError`
* Detailed error message when `path` is not defined
* Add a test case, invalid rack app is passed
@yui-knk
Copy link
Contributor Author

yui-knk commented Nov 28, 2015

@arthurnn I updated a test!

arthurnn pushed a commit that referenced this pull request Nov 28, 2015
Brush up errors of `ActionDispatch::Routing::Mapper#mount`
@arthurnn arthurnn merged commit 3513f80 into rails:master Nov 28, 2015
@arthurnn
Copy link
Member

thanks

@yui-knk yui-knk deleted the better_mount_error branch October 25, 2016 05:53
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

Successfully merging this pull request may close these issues.

None yet

3 participants