Exception: DatashiftJourney::CoreException

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg) ⇒ CoreException

Returns a new instance of CoreException.



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

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

Class Method Details

.generate(name) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/datashift_journey/exceptions.rb', line 10

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

  DatashiftJourney.const_set(name, new_class)
end