Hello,
Having :show_exceptions default to true in Sinatra 0.9.2 is causing
two issues currently:
1. This assumes that Sinatra is serving a site with a human interface,
which is not the case in our application. We were relying on the error
block to catch all errors and return a properly formatted and "header-
ed" XML response, even for development, so we're having to manually
set :show_exceptions, false. We are extending Sinatra::Base, but I
don't think that has anything to do with it, because Sinatra::Default
(and therefore Sinatra::Application) didn't set :show_exceptions
either).
2. We're having some trouble with warbler and rack knowing that it
should be in production, i.e. the set :environment, :production that
is in the
config.ru that Nick provided as an example rackup for
Sinatra does not seem to be getting it into production mode. So for
this reason we really must set :show_exceptions, false in our sinatra
controllers that extend Sinatra::Base.
I think that at the least, maybe some additional documentation for
those whose intent it is to have Sinatra provide non-HTML serving app/
services (even in development mode when error is being thrown), and
possibly even consider changing :show_exceptions to always be false by
default even in development. I could assist with the documentation if
you wanted to provide guidance. I saw the git project for the docs,
and could provide a draft offline if you wanted.
If I'm way off-base, I apologize, but even though I like the look of
the HTML error produced, it doesn't work for everyone.
TIA,
Gary