Module: RescueRegistry
- Defined in:
- lib/rescue_registry/show_exceptions.rb,
lib/rescue_registry.rb,
lib/rescue_registry/context.rb,
lib/rescue_registry/railtie.rb,
lib/rescue_registry/version.rb,
lib/rescue_registry/registry.rb,
lib/rescue_registry/controller.rb,
lib/rescue_registry/reset_context.rb,
lib/rescue_registry/exceptions_app.rb,
lib/rescue_registry/action_dispatch.rb,
lib/rescue_registry/exception_handler.rb,
lib/rescue_registry/rails_test_helpers.rb,
lib/rescue_registry/action_dispatch/show_exceptions.rb,
lib/rescue_registry/action_dispatch/debug_exceptions.rb,
lib/rescue_registry/action_dispatch/exception_wrapper.rb
Overview
This is for use in non-Rails Rack apps. Rails apps will handle exceptions with
ActionDispatch::DebugExceptions and ActionDispatch::ShowExceptions
Defined Under Namespace
Modules: ActionDispatch, Context, Controller, RailsTestHelpers
Classes: ExceptionHandler, ExceptionsApp, HandlerNotFound, RailsExceptionHandler, Railtie, Registry, ResetContext, ShowExceptions
Constant Summary
collapse
- REGISTRY_METHODS =
%i[
handler_for_exception
handles_exception?
status_code_for_exception
response_for_debugging
response_for_public
]
- VERSION =
"1.1.0"
Class Method Summary
collapse
Class Method Details
.context ⇒ Object
20
21
22
|
# File 'lib/rescue_registry.rb', line 20
def self.context
Fiber[:rescue_registry_context]
end
|
.context=(value) ⇒ Object
24
25
26
|
# File 'lib/rescue_registry.rb', line 24
def self.context=(value)
Fiber[:rescue_registry_context] = value
end
|
.with_context(value) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/rescue_registry.rb', line 28
def self.with_context(value)
original = context
self.context = value
yield
ensure
self.context = original
end
|