Commit 4589545f authored by Tom Evans's avatar Tom Evans

OF-2: Suppress extraneous stack trace info

Second attempt to address this issue, this time without changing the S2S
exception handling flow.
parent 0c28ef88
...@@ -284,14 +284,14 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -284,14 +284,14 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
} }
catch (Exception e) { catch (Exception e) {
Log.warn("Error trying to connect to remote server: " + hostname + Log.warn("Error trying to connect to remote server: " + hostname +
"(DNS lookup: " + realHostname + ":" + realPort + ")", e); "(DNS lookup: " + realHostname + ":" + realPort + "): " + e.toString());
try { try {
if (socket != null) { if (socket != null) {
socket.close(); socket.close();
} }
} }
catch (IOException ex) { catch (IOException ex) {
Log.debug("Additional exception while trying to close socket when connection to remote server failed.", ex); Log.debug("Additional exception while trying to close socket when connection to remote server failed: " + ex.toString());
} }
} }
} }
...@@ -383,7 +383,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -383,7 +383,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
catch (SSLHandshakeException e) { catch (SSLHandshakeException e) {
Log.debug("LocalOutgoingServerSession: Handshake error while creating secured outgoing session to remote " + Log.debug("LocalOutgoingServerSession: Handshake error while creating secured outgoing session to remote " +
"server: " + hostname + "(DNS lookup: " + realHostname + ":" + realPort + "server: " + hostname + "(DNS lookup: " + realHostname + ":" + realPort +
")", e); "):" + e.toString());
// Close the connection // Close the connection
if (connection != null) { if (connection != null) {
connection.close(); connection.close();
...@@ -391,7 +391,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -391,7 +391,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
} }
catch (XmlPullParserException e) { catch (XmlPullParserException e) {
Log.warn("Error creating secured outgoing session to remote server: " + hostname + Log.warn("Error creating secured outgoing session to remote server: " + hostname +
"(DNS lookup: " + realHostname + ":" + realPort + ")", e); "(DNS lookup: " + realHostname + ":" + realPort + "): " + e.toString());
// Close the connection // Close the connection
if (connection != null) { if (connection != null) {
connection.close(); connection.close();
...@@ -399,7 +399,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -399,7 +399,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
} }
catch (Exception e) { catch (Exception e) {
Log.error("Error creating secured outgoing session to remote server: " + hostname + Log.error("Error creating secured outgoing session to remote server: " + hostname +
"(DNS lookup: " + realHostname + ":" + realPort + ")", e); "(DNS lookup: " + realHostname + ":" + realPort + "): " + e.toString());
// Close the connection // Close the connection
if (connection != null) { if (connection != null) {
connection.close(); connection.close();
...@@ -708,7 +708,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -708,7 +708,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
} }
} }
catch (Exception e) { catch (Exception e) {
Log.warn("Error returning error to sender. Original packet: " + packet, e); Log.error("Error returning error to sender. Original packet: " + packet, e);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment