Exception: Vagrant::Actions::ActionException
- Inherits:
-
Exception
- Object
- Exception
- Vagrant::Actions::ActionException
- Defined in:
- lib/vagrant/actions/base.rb
Overview
An exception which occured within an action. This should be used instead of error_and_exit, since it allows the Runner to call rescue on all the actions and properly exit. Any message passed into the ActionException is then shown and and vagrant exits.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key, data = {}) ⇒ ActionException
constructor
A new instance of ActionException.
Constructor Details
#initialize(key, data = {}) ⇒ ActionException
Returns a new instance of ActionException.
109 110 111 112 113 114 115 |
# File 'lib/vagrant/actions/base.rb', line 109 def initialize(key, data = {}) @key = key @data = data = Vagrant::Util::Errors.error_string(key, data) super() end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
107 108 109 |
# File 'lib/vagrant/actions/base.rb', line 107 def data @data end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
106 107 108 |
# File 'lib/vagrant/actions/base.rb', line 106 def key @key end |