Exception: Syskit::NameResolutionError
- Inherits:
-
InstanciationError
- Object
- RuntimeError
- SpecError
- InstanciationError
- Syskit::NameResolutionError
- Defined in:
- lib/syskit/exceptions.rb
Overview
Exception raised during instanciation if a name is found that cannot be resolved
Instance Attribute Summary collapse
-
#missing_names ⇒ Object
readonly
The names that are missing.
Attributes inherited from InstanciationError
Instance Method Summary collapse
-
#initialize(missing_names) ⇒ NameResolutionError
constructor
A new instance of NameResolutionError.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(missing_names) ⇒ NameResolutionError
Returns a new instance of NameResolutionError
643 644 645 646 647 648 649 650 651 |
# File 'lib/syskit/exceptions.rb', line 643 def initialize(missing_names) super() @missing_names = if !missing_names.respond_to?(:each) [missing_names] else missing_names.to_a end end |
Instance Attribute Details
#missing_names ⇒ Object (readonly)
The names that are missing
641 642 643 |
# File 'lib/syskit/exceptions.rb', line 641 def missing_names @missing_names end |
Instance Method Details
#pretty_print(pp) ⇒ Object
653 654 655 656 657 658 659 |
# File 'lib/syskit/exceptions.rb', line 653 def pretty_print(pp) pp.text "cannot resolve the names #{missing_names.sort.join(", ")}" if !instanciation_chain.empty? pp.breakable super end end |