Skip to content

Instantly share code, notes, and snippets.

@paul
Created September 30, 2008 21:00
Show Gist options
  • Save paul/13957 to your computer and use it in GitHub Desktop.
Save paul/13957 to your computer and use it in GitHub Desktop.
class Exceptions < Application
provides :sscj1
# handle NotFound exceptions (404)
def not_found
standard_error if content_type == :sscj1
render
end
# handle NotAcceptable exceptions (406)
def not_acceptable
standard_error if content_type == :sscj1
render
end
# Everything else (500)
def standard_error
@exceptions = request.exceptions
@show_details = Merb::Config[:exception_details]
render
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment