class Roby::NoSuchChild
Exception
raised when a child is being resolved by role, but the role is not associated with any child
Attributes
known_children[R]
@return [{String=>Object}] the set of known children
object[R]
@return [Object] the object whose children we try to access
role[R]
@return [String] the role that failed to be resolved
Public Class Methods
new(object, role, known_children)
click to toggle source
# File lib/roby/standard_errors.rb, line 485 def initialize(object, role, known_children) @object, @role, @known_children = object, role, known_children end
Public Instance Methods
pretty_print(pp)
click to toggle source
# File lib/roby/standard_errors.rb, line 489 def pretty_print(pp) pp.text "#{object} has no child with the role '#{role}'" if known_children.empty? pp.text ", actually, it has no child at all" else pp.text ". Known children:" pp.nest(2) do known_children.each do |role, child| pp.breakable pp.text "#{role}: #{child}" end end end end