Exception: DataShift::DataShiftException

Inherits:
StandardError
  • Object
show all
Includes:
Logging
Defined in:
lib/datashift/exceptions.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

#logdir, #logdir=, #logger, #verbose

Constructor Details

#initialize(msg) ⇒ DataShiftException

Returns a new instance of DataShiftException.



13
14
15
16
# File 'lib/datashift/exceptions.rb', line 13

def initialize( msg )
  super
  logger.error(msg)
end

Class Method Details

.generate(name) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/datashift/exceptions.rb', line 18

def self.generate(name)
  new_class = Class.new(DataShiftException) do
    def initialize( msg )
      super( msg )
    end
  end

  DataShift.const_set(name, new_class)
end