Add SMS ID to MalformedSms error
parent
52c9a13ca0
commit
c842211e75
|
@ -105,7 +105,7 @@ module Biju
|
|||
begin
|
||||
Biju::Sms.from_pdu(msg[:message].chomp, msg[:infos][0])
|
||||
rescue Biju::PDU::Errors::PDUError => e
|
||||
malformed = Biju::PDU::Errors::MalformedSms.new(msg[:message].chomp, e)
|
||||
malformed = Biju::PDU::Errors::MalformedSms.new(msg[:message].chomp, msg[:infos][0], e)
|
||||
if exceptions
|
||||
raise malformed
|
||||
else
|
||||
|
|
|
@ -6,9 +6,10 @@ module Biju
|
|||
|
||||
class MalformedSms < PDUError
|
||||
attr_reader :original_exception
|
||||
attr_reader :pdu
|
||||
attr_reader :pdu, :id
|
||||
|
||||
def initialize(pdu, original_exception = nil)
|
||||
def initialize(pdu, id, original_exception = nil)
|
||||
@id = id
|
||||
@pdu = pdu
|
||||
@original_exception = original_exception
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue