Module: Hyde::DSL::CommonMethods
- Included in:
- ProbeContext, ProcessorContext, TemplateContext
- Defined in:
- lib/hyde/dsl/methods_common.rb
Overview
Methods shared by probes, preprocessors and filters.
Instance Method Summary collapse
-
#bounce ⇒ Object
Bounce request to the next handler.
-
#die(errorcode, backtrace: nil) ⇒ Object
Stop execution and generate a boilerplate response with the given code.
Instance Method Details
#bounce ⇒ Object
Bounce request to the next handler
23 24 25 |
# File 'lib/hyde/dsl/methods_common.rb', line 23 def bounce throw :break end |
#die(errorcode, backtrace: nil) ⇒ Object
Stop execution and generate a boilerplate response with the given code
11 12 13 14 15 16 17 18 19 |
# File 'lib/hyde/dsl/methods_common.rb', line 11 def die(errorcode, backtrace: nil) throw :finish, [errorcode].append( *(@origin.properties["handle.#{errorcode}"] or @origin.properties["handle.default"]).call( errorcode, backtrace: backtrace ) ) end |