Write exception in logger if message can not be decoded

This commit is contained in:
Guillaume DOTT 2014-02-10 11:08:32 +01:00
parent 5bb8b32ce7
commit 52589aa802

View File

@ -32,8 +32,12 @@ module SMSd
break if @terminate break if @terminate
modem.messages.each do |sms| modem.messages.each do |sms|
if sms.is_a?(Biju::Sms)
handle_message sms unless check_number( handle_message sms unless check_number(
sms.phone_number, sms.type_of_address) sms.phone_number, sms.type_of_address)
else
logger.error sms.to_s
end
end end
end end
modem.close modem.close