diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-15 11:51:29 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-15 11:51:29 +1200 |
commit | fa26dd5f14a991f327c26517a645c6b4f77c4a73 (patch) | |
tree | 26477b69c3aeca4cba7b6947cf6973d762841cda /src/org/traccar/smpp/ClientSmppSessionHandler.java | |
parent | 2fb444df86d56246a8b5cee515eb91490c8dee05 (diff) | |
download | trackermap-server-fa26dd5f14a991f327c26517a645c6b4f77c4a73.tar.gz trackermap-server-fa26dd5f14a991f327c26517a645c6b4f77c4a73.tar.bz2 trackermap-server-fa26dd5f14a991f327c26517a645c6b4f77c4a73.zip |
Provide error messages
Diffstat (limited to 'src/org/traccar/smpp/ClientSmppSessionHandler.java')
-rw-r--r-- | src/org/traccar/smpp/ClientSmppSessionHandler.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java index 37882c76a..55c6cccc3 100644 --- a/src/org/traccar/smpp/ClientSmppSessionHandler.java +++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java @@ -45,7 +45,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { @Override public PduResponse firePduRequestReceived(PduRequest request) { - PduResponse response = null; + PduResponse response; try { if (request instanceof DeliverSm) { String sourceAddress = ((DeliverSm) request).getSourceAddress().getAddress(); @@ -53,7 +53,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding())); LOGGER.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress); - boolean isDeliveryReceipt = false; + boolean isDeliveryReceipt; if (smppClient.getDetectDlrByOpts()) { isDeliveryReceipt = request.getOptionalParameters() != null; } else { @@ -65,8 +65,8 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { } } response = request.createResponse(); - } catch (Throwable error) { - LOGGER.warn(null, error); + } catch (Exception error) { + LOGGER.warn("SMS receiving error", error); response = request.createResponse(); response.setResultMessage(error.getMessage()); response.setCommandStatus(SmppConstants.STATUS_UNKNOWNERR); |