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

Sinatra 2 is no longer able to display custom show_exception #1084

Closed
ujifgc opened this issue Jan 28, 2016 · 3 comments
Closed

Sinatra 2 is no longer able to display custom show_exception #1084

ujifgc opened this issue Jan 28, 2016 · 3 comments
Labels
Milestone

Comments

@ujifgc
Copy link
Contributor

ujifgc commented Jan 28, 2016

According to rack/rack#836 (discussion) and rack/rack#922 (actual PR) Rack 2 is now using pre-compiled constant TEMPLATE to render it's show_exception while Sinatra still expects Rack to load it from @template variable.

The corresponding test is shut up by this commit: fad3619

If this is official stance of Sinatra 2 to no longer provide custom exception HTML, then file https://github.com/sinatra/sinatra/blob/master/lib/sinatra/show_exceptions.rb is no longer needed.

@zzak
Copy link
Member

zzak commented Jan 31, 2016

@ujifgc I'm not sure our stance, can you give an example?

@ujifgc
Copy link
Contributor Author

ujifgc commented Jan 31, 2016

require 'sinatra'

enable :show_exceptions

get '/hi' do
  raise 'exception'
end

On Sinatra 1 and Rack 1 this code shows Sinatra exception page.
On Sinatra 2 alpha and Rack 2 alpha this code shows Rack exception page.

@zzak
Copy link
Member

zzak commented May 9, 2016

:( can confirm

zzak pushed a commit that referenced this issue May 10, 2016
@zzak zzak closed this as completed in 57c2ebb May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants