Exception: Syskit::InvalidComponentSelection
- Inherits:
-
InstanciationError
- Object
- RuntimeError
- SpecError
- InstanciationError
- Syskit::InvalidComponentSelection
- Defined in:
- lib/syskit/exceptions.rb
Overview
Exception raised when the dependency injection resolves to a selection that is not compatible with the expected type
Instance Attribute Summary collapse
-
#expected_model ⇒ Object
readonly
- Model<DataService>,Model<Component>
-
the expected model.
-
#model ⇒ Object
readonly
- Model<DataService>,Model<Component>
-
the model found by the dependency injection.
-
#name ⇒ Object
readonly
- String
-
the selection name.
Attributes inherited from InstanciationError
Instance Method Summary collapse
-
#initialize(expected_model, name, model) ⇒ InvalidComponentSelection
constructor
A new instance of InvalidComponentSelection.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(expected_model, name, model) ⇒ InvalidComponentSelection
Returns a new instance of InvalidComponentSelection
596 597 598 599 |
# File 'lib/syskit/exceptions.rb', line 596 def initialize(expected_model, name, model) @expected_model, @name, @model = expected_model, name, model end |
Instance Attribute Details
#expected_model ⇒ Object (readonly)
- Model<DataService>,Model<Component>
-
the expected model
589 590 591 |
# File 'lib/syskit/exceptions.rb', line 589 def expected_model @expected_model end |
#model ⇒ Object (readonly)
- Model<DataService>,Model<Component>
-
the model found by the
dependency injection
594 595 596 |
# File 'lib/syskit/exceptions.rb', line 594 def model @model end |
#name ⇒ Object (readonly)
- String
-
the selection name
591 592 593 |
# File 'lib/syskit/exceptions.rb', line 591 def name @name end |
Instance Method Details
#pretty_print(pp) ⇒ Object
601 602 603 |
# File 'lib/syskit/exceptions.rb', line 601 def pretty_print(pp) pp.text "model #{expected_model.short_name} found for '#{name}' is incompatible with the expected model #{expected_model.short_name}" end |