Exception: PgVerify::Core::CMDRunner::CMDRunnerError

Inherits:
Error
  • Object
show all
Defined in:
lib/pg-verify/core/cmd_runner.rb

Instance Method Summary collapse

Methods inherited from Error

#to_formatted

Constructor Details

#initialize(cmd, output, err, delta_seconds) ⇒ CMDRunnerError

Returns a new instance of CMDRunnerError.



135
136
137
# File 'lib/pg-verify/core/cmd_runner.rb', line 135

def initialize(cmd, output, err, delta_seconds)
    @cmd, @output, @err, @delta_seconds = cmd, output, err, delta_seconds
end

Instance Method Details

#formattedObject



139
140
141
142
143
144
# File 'lib/pg-verify/core/cmd_runner.rb', line 139

def formatted()
    title = "Running '#{@cmd}' failed after #{@delta_seconds} seconds:"
    
    body = "$ #{@cmd.c_string} \n\n #{@err}"
    return title, body
end