Exception: Syskit::InvalidProvides
- Defined in:
- lib/syskit/exceptions.rb
Overview
Raised when a provides declaration does not match the underlying task interface
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
-
#required_service ⇒ Object
readonly
Returns the value of attribute required_service.
Instance Method Summary collapse
-
#initialize(model, required_service, original_error = nil) ⇒ InvalidProvides
constructor
A new instance of InvalidProvides.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(model, required_service, original_error = nil) ⇒ InvalidProvides
Returns a new instance of InvalidProvides
27 28 29 30 31 32 |
# File 'lib/syskit/exceptions.rb', line 27 def initialize(model, required_service, original_error = nil) @model = model @required_service = required_service @original_error = original_error super() end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model
24 25 26 |
# File 'lib/syskit/exceptions.rb', line 24 def model @model end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error
23 24 25 |
# File 'lib/syskit/exceptions.rb', line 23 def original_error @original_error end |
#required_service ⇒ Object (readonly)
Returns the value of attribute required_service
25 26 27 |
# File 'lib/syskit/exceptions.rb', line 25 def required_service @required_service end |
Instance Method Details
#pretty_print(pp) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/syskit/exceptions.rb', line 34 def pretty_print(pp) pp.text "#{model.short_name} does not provide the '#{required_service.short_name}' service's interface" if original_error pp.nest(2) do pp.breakable pp.text original_error. end end end |