Exception: Git::GitError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/git/git_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, exit_code, error_message) ⇒ GitError

Returns a new instance of GitError.



7
8
9
10
11
12
# File 'lib/git/git_error.rb', line 7

def initialize(command, exit_code, error_message)
  @command = command
  @exit_code = exit_code
  @error_message = error_message
  super("Git command #{@command} failed with exit code #{@exit_code}. Message:\n#{@error_message}")
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



5
6
7
# File 'lib/git/git_error.rb', line 5

def command
  @command
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



5
6
7
# File 'lib/git/git_error.rb', line 5

def error_message
  @error_message
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



5
6
7
# File 'lib/git/git_error.rb', line 5

def exit_code
  @exit_code
end