Method: R10K::Error#initialize

Defined in:
lib/r10k/errors.rb

#initialize(mesg) ⇒ Error #initialize(mesg, options) ⇒ Error

Returns a new instance of Error.

Overloads:

  • #initialize(mesg) ⇒ Error

    Parameters:

    • mesg (String)

      The exception mesg

  • #initialize(mesg, options) ⇒ Error

    Parameters:

    • mesg (String)

      The exception mesg

    • options (Hash)

      A set of options to store on the exception



32
33
34
35
36
37
38
39
40
41
# File 'lib/r10k/errors.rb', line 32

def initialize(mesg, options = {})
  super(mesg)

  bt = options.delete(:backtrace)
  if bt
    set_backtrace(bt)
  end

  @options = options
end