class Grit::Git::CommandFailed
Raised when a native git command exits with non-zero.
Attributes
command[R]
The full git command that failed as a String.
err[R]
Everything output on the command's stderr as a String.
exitstatus[R]
The integer exit status.
out[R]
Everything output on the command's stdout as a String.
Public Class Methods
new(command, exitstatus=nil, err='', out='')
click to toggle source
Calls superclass method
# File lib/grit/git.rb, line 32 def initialize(command, exitstatus=nil, err='', out='') if exitstatus @command = command @exitstatus = exitstatus @err = err @out = out message = "Command failed [#{exitstatus}]: #{command}" message << "\n\n" << err unless err.nil? || err.empty? super message else super command end end