Boomerang AT log show +CMS ERROR: 304

Hi

I got little problem in using Boomerang GSM to send SMS message. I'm
sucessfully use Boomerang GSM to send out SMS but some of the messages
are failed to be sent since error input from user like wrong
destination mobile number etc. and result +CMS ERROR: 304 in AT
command log.

My question is how to detect +CMS ERROR: 304 after calling
GSM1.SendSMS(SMS); procedure so I can report success or failure to the
user after they send.

Thank you.

try except statement

You can detect it via common try/except statement.

try
  GSM1.SendSMS(SMS);
except
  on E: EGSMError do
    // failure ;
end;