Improved error handling.
This commit is contained in:
parent
697db3839f
commit
2c25123824
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue