Exception: Fortitude::Errors::NoBlockToYieldTo
- Defined in:
- lib/fortitude/errors.rb
Instance Attribute Summary collapse
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Instance Method Summary collapse
-
#initialize(widget, local_jump_exception = nil) ⇒ NoBlockToYieldTo
constructor
A new instance of NoBlockToYieldTo.
Constructor Details
#initialize(widget, local_jump_exception = nil) ⇒ NoBlockToYieldTo
Returns a new instance of NoBlockToYieldTo.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/fortitude/errors.rb', line 156 def initialize(, local_jump_exception = nil) @local_jump_exception = local_jump_exception @widget = = %{You're trying to call 'yield' (or 'yield_from_widget', or the Erector-compatibility method 'call_block') from the widget #{}; however, there is nothing to yield to. Fortitude looks for something to yield to in this order: 1. A block passed to a yield at render time directly (usually via the 'widget' call); 2. A block passed to the constructor of the widget; 3. The layout the widget is being rendered in. None of these exist here, and so calling 'yield', 'yield_from_widget', or 'call_block' is an undefined operation.} if @local_jump_exception += %{ This was caused by a #{@local_jump_exception.class.name}, which is: #{@local_jump_exception}:\n #{@local_jump_exception.backtrace.join("\n ")}} end super() end |
Instance Attribute Details
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
154 155 156 |
# File 'lib/fortitude/errors.rb', line 154 def @widget end |