Improved error handling.

This commit is contained in:
Martin Edenhofer 2014-11-25 07:51:45 +01:00
parent 697db3839f
commit 2c25123824

View file

@ -7,10 +7,10 @@ class Channel < ApplicationModel
channels = Channel.where( 'active = ? AND area LIKE ?', true, '%::Inbound' ) channels = Channel.where( 'active = ? AND area LIKE ?', true, '%::Inbound' )
channels.each { |channel| channels.each { |channel|
begin begin
c = eval 'Channel::' + channel[:adapter] + '.new' c = eval 'Channel::' + channel[:adapter].upcase + '.new'
c.fetch(channel) c.fetch(channel)
rescue Exception => e rescue Exception => e
puts "can't use " + 'Channel::' + channel[:adapter] puts "can't use " + 'Channel::' + channel[:adapter].upcase
puts e.inspect puts e.inspect
puts e.backtrace puts e.backtrace
c.disconnect c.disconnect