Exception: Sandals::ActionError
- Inherits:
-
StandardError
- Object
- StandardError
- Sandals::ActionError
- Defined in:
- lib/sandals/action_error.rb
Instance Attribute Summary collapse
-
#control ⇒ Object
readonly
Returns the value of attribute control.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
Instance Method Summary collapse
- #action_name ⇒ Object
-
#initialize(control, original_error) ⇒ ActionError
constructor
A new instance of ActionError.
- #location ⇒ Object
Constructor Details
#initialize(control, original_error) ⇒ ActionError
Returns a new instance of ActionError.
7 8 9 10 11 |
# File 'lib/sandals/action_error.rb', line 7 def initialize(control, original_error) @control = control @original_error = original_error super(original_error.) end |
Instance Attribute Details
#control ⇒ Object (readonly)
Returns the value of attribute control.
5 6 7 |
# File 'lib/sandals/action_error.rb', line 5 def control @control end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
5 6 7 |
# File 'lib/sandals/action_error.rb', line 5 def original_error @original_error end |
Instance Method Details
#action_name ⇒ Object
13 14 15 16 17 |
# File 'lib/sandals/action_error.rb', line 13 def action_name return control.content if control.respond_to?(:content) control.label end |
#location ⇒ Object
19 20 21 |
# File 'lib/sandals/action_error.rb', line 19 def location ErrorDetails.for(original_error).fetch(:location) end |