Exception: Syskit::WrongPortConnectionTypes

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/syskit/exceptions.rb

Overview

Exception raised when a connection is being created with mismatching port types

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, sink) ⇒ WrongPortConnectionTypes

Returns a new instance of WrongPortConnectionTypes



816
817
818
819
# File 'lib/syskit/exceptions.rb', line 816

def initialize(source, sink)
    @source = source
    @sink = sink
end

Instance Attribute Details

#sinkObject (readonly)

Returns the value of attribute sink



815
816
817
# File 'lib/syskit/exceptions.rb', line 815

def sink
  @sink
end

#sourceObject (readonly)

Returns the value of attribute source



815
816
817
# File 'lib/syskit/exceptions.rb', line 815

def source
  @source
end

Instance Method Details

#pretty_print(pp) ⇒ Object



821
822
823
# File 'lib/syskit/exceptions.rb', line 821

def pretty_print(pp)
    pp.text "cannot connect output port #{source} to input port #{sink}: types mismatch (resp. #{source.type} and #{sink.type})"
end