Exception: R10K::Git::GitError

Inherits:
Error
  • Object
show all
Defined in:
lib/r10k/git/errors.rb

Direct Known Subclasses

UnresolvableRefError

Instance Attribute Summary collapse

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods inherited from Error

wrap

Constructor Details

#initialize(mesg, options = {}) ⇒ GitError

Returns a new instance of GitError.



9
10
11
12
# File 'lib/r10k/git/errors.rb', line 9

def initialize(mesg, options = {})
  super
  @git_dir = @options[:git_dir]
end

Instance Attribute Details

#git_dirObject (readonly)

Returns the value of attribute git_dir.



7
8
9
# File 'lib/r10k/git/errors.rb', line 7

def git_dir
  @git_dir
end

Instance Method Details

#messageObject



14
15
16
17
18
19
20
# File 'lib/r10k/git/errors.rb', line 14

def message
  msg = super
  if @git_dir
    msg << " at #{@git_dir}"
  end
  msg
end