Class: VagrantK8s::CommandRunner::CommandError

Inherits:
Vagrant::Errors::VagrantError
  • Object
show all
Defined in:
lib/vagrant-k8s/command_runner.rb

Overview

Raised when a command exits non-zero. Subclasses VagrantError so callers can still rescue it as one, but carries its own message: VagrantError drops a positional message string and would otherwise display "No error message".

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ CommandError

Returns a new instance of CommandError.



11
12
13
14
# File 'lib/vagrant-k8s/command_runner.rb', line 11

def initialize(message)
  @command_error_message = message
  super()
end

Instance Method Details

#messageObject



20
21
22
# File 'lib/vagrant-k8s/command_runner.rb', line 20

def message
  @command_error_message
end

#to_sObject



16
17
18
# File 'lib/vagrant-k8s/command_runner.rb', line 16

def to_s
  @command_error_message
end