Exception: MGit::SystemCommandError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mgit/exceptions.rb

Direct Known Subclasses

GitError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd, error) ⇒ SystemCommandError

Returns a new instance of SystemCommandError.



7
8
9
10
# File 'lib/mgit/exceptions.rb', line 7

def initialize(cmd, error)
  @cmd = cmd
  @error = error
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



5
6
7
# File 'lib/mgit/exceptions.rb', line 5

def cmd
  @cmd
end

#errorObject (readonly)

Returns the value of attribute error.



5
6
7
# File 'lib/mgit/exceptions.rb', line 5

def error
  @error
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/mgit/exceptions.rb', line 12

def to_s
  "Error: #{@error}\nCommand was: #{@cmd}"
end