From 2c251238240309c9be030332c3161c045a1faeaa Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 25 Nov 2014 07:51:45 +0100 Subject: [PATCH] Improved error handling. --- app/models/channel.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/channel.rb b/app/models/channel.rb index d74ac21fe..4f4d15577 100644 --- a/app/models/channel.rb +++ b/app/models/channel.rb @@ -7,10 +7,10 @@ class Channel < ApplicationModel channels = Channel.where( 'active = ? AND area LIKE ?', true, '%::Inbound' ) channels.each { |channel| begin - c = eval 'Channel::' + channel[:adapter] + '.new' + c = eval 'Channel::' + channel[:adapter].upcase + '.new' c.fetch(channel) rescue Exception => e - puts "can't use " + 'Channel::' + channel[:adapter] + puts "can't use " + 'Channel::' + channel[:adapter].upcase puts e.inspect puts e.backtrace c.disconnect