Exception: Git::FailedError
- Inherits:
-
GitExecuteError
- Object
- StandardError
- GitExecuteError
- Git::FailedError
- Defined in:
- lib/git/failed_error.rb
Overview
This error is raised when a git command fails
The git command executed, status, stdout, and stderr are available from this object. The #message includes the git command, the status of the process, and the stderr of the process.
Instance Attribute Summary collapse
-
#result ⇒ Git::CommandLineResult
readonly
The result of the git command including the git command and its status and output.
Instance Method Summary collapse
-
#initialize(result) ⇒ FailedError
constructor
Create a FailedError object.
Constructor Details
#initialize(result) ⇒ FailedError
Create a FailedError object
Since this gem redirects stderr to stdout, the stdout of the process is used.
29 30 31 32 |
# File 'lib/git/failed_error.rb', line 29 def initialize(result) super("#{result.git_cmd}\nstatus: #{result.status}\noutput: #{result.stdout.inspect}") @result = result end |
Instance Attribute Details
#result ⇒ Git::CommandLineResult (readonly)
The result of the git command including the git command and its status and output
51 52 53 |
# File 'lib/git/failed_error.rb', line 51 def result @result end |