Page 1 of 1

server_evClientSubmitSm try catch

Posted: Wed Sep 19, 2018 2:31 pm
by alexf
event server_evClientSubmitSm

When an exception occurs in SubmitSM
the packet SubmitSM_resp is automatically sent to the client "SMPP error 8"

how to remove ?


Code: Select all

      void server_evClientSubmitSm(object sender, SmppServerClient client, Inetlab.SMPP.PDU.SubmitSm data)
               int a;
               a = 10/0;


Re: server_evClientSubmitSm try catch

Posted: Mon Oct 01, 2018 7:35 pm
by alt
Library sends response with status ESME_RSYSERR on Request PDU when corresponding event handler throws an exception.
When event handler method is not attached to the client library sends another error, f.i for SubmitSm it is ESME_RSUBMITFAIL.

For your example SubmitSmResp should always have ESME_ROK status. In real code it could be an exception in catch block.