Exception: Syskit::AmbiguousPortOnCompositeModel
Overview
Exception raised when trying to refer to a port on a composite model (a.k.a. proxy model, i.e. a model that refers to a task and services that are not provided by this task), and both the task and the services have ports with that name
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#models ⇒ Object
readonly
Returns the value of attribute models.
-
#port_name ⇒ Object
readonly
Returns the value of attribute port_name.
Instance Method Summary collapse
-
#initialize(model, models, port_name, candidates) ⇒ AmbiguousPortOnCompositeModel
constructor
A new instance of AmbiguousPortOnCompositeModel.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(model, models, port_name, candidates) ⇒ AmbiguousPortOnCompositeModel
Returns a new instance of AmbiguousPortOnCompositeModel
894 895 896 |
# File 'lib/syskit/exceptions.rb', line 894 def initialize(model, models, port_name, candidates) @model, @models, @port_name, @candidates = model, models, port_name, candidates end |
Instance Attribute Details
#candidates ⇒ Object (readonly)
Returns the value of attribute candidates
893 894 895 |
# File 'lib/syskit/exceptions.rb', line 893 def candidates @candidates end |
#model ⇒ Object (readonly)
Returns the value of attribute model
893 894 895 |
# File 'lib/syskit/exceptions.rb', line 893 def model @model end |
#models ⇒ Object (readonly)
Returns the value of attribute models
893 894 895 |
# File 'lib/syskit/exceptions.rb', line 893 def models @models end |
#port_name ⇒ Object (readonly)
Returns the value of attribute port_name
893 894 895 |
# File 'lib/syskit/exceptions.rb', line 893 def port_name @port_name end |
Instance Method Details
#pretty_print(pp) ⇒ Object
897 898 899 900 901 902 903 904 905 906 907 |
# File 'lib/syskit/exceptions.rb', line 897 def pretty_print(pp) pp.text "port name #{port_name} is ambiguous on #{model}" pp.breakable pp.text "it exists #{candidates.size} times:" pp.nest(2) do pp.seplist(candidates) do |p| pp.breakable p.pretty_print(pp) end end end |