Exception: Compote::UndefinedCommandError

Inherits:
Error
  • Object
show all
Defined in:
lib/compote/error.rb

Instance Attribute Summary

Attributes inherited from Error

#message

Instance Method Summary collapse

Constructor Details

#initialize(service_name:, command_name:, config:) ⇒ UndefinedCommandError

Returns a new instance of UndefinedCommandError.



132
133
134
135
136
137
138
139
140
# File 'lib/compote/error.rb', line 132

def initialize ( service_name:, command_name:, config: )

  message = "Error running compote command: Can't find command named \#{ command_name }\" for service \"#{ service_name }\" in config \"#{ config.file_name }\"."

  message += "\n" + "Seems that config doesn't have a service with such name." unless config.has_service_config? service_name

  super message

end