Class: Grape::Middleware::Error::Options
- Inherits:
-
Data
- Object
- Data
- Grape::Middleware::Error::Options
- Includes:
- DeprecatedOptionsHashAccess
- Defined in:
- lib/grape/middleware/error.rb
Instance Attribute Summary collapse
-
#all_rescue_handler ⇒ Object
readonly
Returns the value of attribute all_rescue_handler.
-
#base_only_rescue_handlers ⇒ Object
readonly
Returns the value of attribute base_only_rescue_handlers.
-
#content_types ⇒ Object
readonly
Returns the value of attribute content_types.
-
#default_error_formatter ⇒ Object
readonly
Returns the value of attribute default_error_formatter.
-
#default_message ⇒ Object
readonly
Returns the value of attribute default_message.
-
#default_status ⇒ Object
readonly
Returns the value of attribute default_status.
-
#error_formatters ⇒ Object
readonly
Returns the value of attribute error_formatters.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#grape_exceptions_rescue_handler ⇒ Object
readonly
Returns the value of attribute grape_exceptions_rescue_handler.
-
#internal_grape_exceptions_rescue_handler ⇒ Object
readonly
Returns the value of attribute internal_grape_exceptions_rescue_handler.
-
#rescue_all ⇒ Object
readonly
Returns the value of attribute rescue_all.
-
#rescue_grape_exceptions ⇒ Object
readonly
Returns the value of attribute rescue_grape_exceptions.
-
#rescue_handlers ⇒ Object
readonly
Returns the value of attribute rescue_handlers.
-
#rescue_options ⇒ Object
readonly
Returns the value of attribute rescue_options.
Instance Method Summary collapse
Methods included from DeprecatedOptionsHashAccess
Constructor Details
#initialize(all_rescue_handler: nil, base_only_rescue_handlers: nil, content_types: nil, default_error_formatter: nil, default_message: '', default_status: 500, error_formatters: nil, format: :txt, grape_exceptions_rescue_handler: nil, internal_grape_exceptions_rescue_handler: nil, rescue_all: false, rescue_grape_exceptions: false, rescue_handlers: nil, rescue_options: nil) ⇒ Options
Returns a new instance of Options.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/grape/middleware/error.rb', line 18 def initialize( all_rescue_handler: nil, base_only_rescue_handlers: nil, content_types: nil, default_error_formatter: nil, default_message: '', default_status: 500, error_formatters: nil, format: :txt, grape_exceptions_rescue_handler: nil, internal_grape_exceptions_rescue_handler: nil, rescue_all: false, rescue_grape_exceptions: false, rescue_handlers: nil, rescue_options: nil ) # `rescue_options:` arrives nil from `Endpoint#error_middleware_options` # when no `rescue_from` has been called — fall back to the documented # defaults rather than letting nil propagate to `def_delegator # :rescue_options, :backtrace`. ||= Grape::DSL::RescueOptions.new super end |
Instance Attribute Details
#all_rescue_handler ⇒ Object (readonly)
Returns the value of attribute all_rescue_handler
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def all_rescue_handler @all_rescue_handler end |
#base_only_rescue_handlers ⇒ Object (readonly)
Returns the value of attribute base_only_rescue_handlers
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def base_only_rescue_handlers @base_only_rescue_handlers end |
#content_types ⇒ Object (readonly)
Returns the value of attribute content_types
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def content_types @content_types end |
#default_error_formatter ⇒ Object (readonly)
Returns the value of attribute default_error_formatter
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def default_error_formatter @default_error_formatter end |
#default_message ⇒ Object (readonly)
Returns the value of attribute default_message
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def @default_message end |
#default_status ⇒ Object (readonly)
Returns the value of attribute default_status
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def default_status @default_status end |
#error_formatters ⇒ Object (readonly)
Returns the value of attribute error_formatters
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def error_formatters @error_formatters end |
#format ⇒ Object (readonly)
Returns the value of attribute format
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def format @format end |
#grape_exceptions_rescue_handler ⇒ Object (readonly)
Returns the value of attribute grape_exceptions_rescue_handler
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def grape_exceptions_rescue_handler @grape_exceptions_rescue_handler end |
#internal_grape_exceptions_rescue_handler ⇒ Object (readonly)
Returns the value of attribute internal_grape_exceptions_rescue_handler
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def internal_grape_exceptions_rescue_handler @internal_grape_exceptions_rescue_handler end |
#rescue_all ⇒ Object (readonly)
Returns the value of attribute rescue_all
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def rescue_all @rescue_all end |
#rescue_grape_exceptions ⇒ Object (readonly)
Returns the value of attribute rescue_grape_exceptions
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def rescue_grape_exceptions @rescue_grape_exceptions end |
#rescue_handlers ⇒ Object (readonly)
Returns the value of attribute rescue_handlers
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def rescue_handlers @rescue_handlers end |
#rescue_options ⇒ Object (readonly)
Returns the value of attribute rescue_options
9 10 11 |
# File 'lib/grape/middleware/error.rb', line 9 def @rescue_options end |