class Syskit::UnknownServiceName

Exception raised when a service of a given name is required but none can be found on a particular task context model

@see NoMatchingService, AmbiguousServiceSelection

Attributes

component_model[R]

@return [Model<Component>] the component on which we were looking

for a given service
service_name[R]

@return [String] the service name

Public Class Methods

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

Public Instance Methods

pretty_print(pp) click to toggle source
# File lib/syskit/exceptions.rb, line 167
def pretty_print(pp)
    pp.text "cannot find service #{service_name} in #{component_model.short_name}"
    pp.text "the services of #{component_model.short_name} are:"
    pp.nest(2) do
        pp.breakable
        pp.seplist(component_model.each_data_service.to_a) do |srv|
            _, srv = *srv
            pp.text "#{srv.full_name}: #{srv.model.short_name}"
        end
    end
end