class Syskit::InvalidAutoConnection

Raised when trying to autoconnect two objects, but no connections could be found

Attributes

sink[R]
source[R]

Public Class Methods

new(source, sink) click to toggle source
# File lib/syskit/exceptions.rb, line 662
def initialize(source, sink)
    @source, @sink = source, sink
end

Public Instance Methods

pretty_print(pp) click to toggle source
# File lib/syskit/exceptions.rb, line 666
def pretty_print(pp)
    pp.text "could not find any connections from #{source.short_name} to #{sink.short_name}"
    if source.respond_to?(:each_output_port)
        pp.nest(2) do
            pp.breakable
            pp.text "the outputs of #{source.short_name} are"
            pp.nest(2) do
                pp.breakable
                pp.seplist(source.each_output_port) do |out_p|
                    pp.text "#{out_p.name}[#{out_p.type.name}]"
                end
            end
        end
    end
    if sink.respond_to?(:each_input_port)
        pp.nest(2) do
            pp.breakable
            pp.text "the inputs of #{sink.short_name} are"
            pp.nest(2) do
                pp.breakable
                pp.seplist(sink.each_input_port) do |in_p|
                    pp.text "#{in_p.name}[#{in_p.type.name}]"
                end
            end
        end
    end
end