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

Override Rack::ShowExceptions#pretty to set custom template #1377

Merged
merged 1 commit into from
Feb 6, 2018

Conversation

jkowens
Copy link
Member

@jkowens jkowens commented Jan 6, 2018

This overrides Rack::ShowExceptions::TEMPLATE without affecting other Rack apps that are mounted alongside Sinatra. Resolves #1376.

I would like to revisit this if rack/rack/pull/1223 gets merged 😜

This overrides Rack::ShowExceptions::TEMPLATE without affecting other
Rack apps that are mounted alongside Sinatra.
Copy link
Member

@namusyaka namusyaka left a comment

Choose a reason for hiding this comment

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

This looks good to me.

In my opinion, if the rack pr will be accepted, it means that the way is standard for defining custom template in any sub frameworks, but our current issue should be considered separately from that.

I also thought about defining the Sinatra::ShowException class as a completely unique class apart from those of rack, like ActionDispatch::ShowExceptions
However our exception handling depends on env['rack.errors'], so at least at the moment we should inherit and extend Rack :: ShowExceptions.

@namusyaka namusyaka added this to the v2.0.1 milestone Feb 6, 2018
@namusyaka
Copy link
Member

@jkowens I'm going to merge this PR, thanks for your patch.
Please let me know if there are any worries.

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.

2 participants