Exception: Syskit::AmbiguousAutoConnection
Overview
Raised when trying to compute connection between a port and a set of ports (such as connecting a port to a service or component) and more than one match is found
Instance Attribute Summary collapse
-
#input_candidates ⇒ Object
readonly
The set of input candidates.
-
#output ⇒ Object
readonly
The output for which we were trying to find an input.
Instance Method Summary collapse
-
#initialize(output, input_candidates) ⇒ AmbiguousAutoConnection
constructor
A new instance of AmbiguousAutoConnection.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(output, input_candidates) ⇒ AmbiguousAutoConnection
Returns a new instance of AmbiguousAutoConnection
708 709 710 711 |
# File 'lib/syskit/exceptions.rb', line 708 def initialize(output, input_candidates) @input_candidates, @output = input_candidates, output end |
Instance Attribute Details
#input_candidates ⇒ Object (readonly)
The set of input candidates
706 707 708 |
# File 'lib/syskit/exceptions.rb', line 706 def input_candidates @input_candidates end |
#output ⇒ Object (readonly)
The output for which we were trying to find an input
704 705 706 |
# File 'lib/syskit/exceptions.rb', line 704 def output @output end |
Instance Method Details
#pretty_print(pp) ⇒ Object
713 714 715 716 717 718 719 720 721 722 723 724 725 |
# File 'lib/syskit/exceptions.rb', line 713 def pretty_print(pp) pp.text "there is an ambiguity while automatically connecting " pp.text output.short_name pp.breakable pp.text "candidates:" input_candidates = self.input_candidates.sort_by(&:name) pp.nest(2) do pp.breakable pp.seplist(input_candidates) do |input_port| pp.text input_port.short_name end end end |