summaryrefslogtreecommitdiff
path: root/js/src/Ice/ConnectionI.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/Ice/ConnectionI.js')
-rw-r--r--js/src/Ice/ConnectionI.js24
1 files changed, 19 insertions, 5 deletions
diff --git a/js/src/Ice/ConnectionI.js b/js/src/Ice/ConnectionI.js
index e98c9d2c4c6..6f6a5d14320 100644
--- a/js/src/Ice/ConnectionI.js
+++ b/js/src/Ice/ConnectionI.js
@@ -1230,6 +1230,20 @@ var ConnectionI = Class({
s.push(this._endpoint.protocol());
s.push(" connection\n");
s.push(this.toString());
+
+ //
+ // Trace the cause of unexpected connection closures
+ //
+ if(!(this._exception instanceof CloseConnectionException ||
+ this._exception instanceof ForcedCloseConnectionException ||
+ this._exception instanceof ConnectionTimeoutException ||
+ this._exception instanceof CommunicatorDestroyedException ||
+ this._exception instanceof ObjectAdapterDeactivatedException))
+ {
+ s.push("\n");
+ s.push(this._exception.toString());
+ }
+
this._instance.initializationData().logger.trace(traceLevels.networkCat, s.join(""));
}
}
@@ -1395,11 +1409,11 @@ var ConnectionI = Class({
// Don't warn about certain expected exceptions.
//
if(!(this._exception instanceof Ice.CloseConnectionException ||
- this._exception instanceof Ice.ForcedCloseConnectionException ||
- this._exception instanceof Ice.ConnectionTimeoutException ||
- this._exception instanceof Ice.CommunicatorDestroyedException ||
- this._exception instanceof Ice.ObjectAdapterDeactivatedException ||
- (this._exception instanceof Ice.ConnectionLostException && this._state === StateClosing)))
+ this._exception instanceof Ice.ForcedCloseConnectionException ||
+ this._exception instanceof Ice.ConnectionTimeoutException ||
+ this._exception instanceof Ice.CommunicatorDestroyedException ||
+ this._exception instanceof Ice.ObjectAdapterDeactivatedException ||
+ (this._exception instanceof Ice.ConnectionLostException && this._state === StateClosing)))
{
this.warning("connection exception", this._exception);
}