hume 0.10.3 → 0.10.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,9 +75,15 @@ class ChatSocket {
|
|
|
75
75
|
(_b = (_a = this.eventHandlers).close) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
76
76
|
};
|
|
77
77
|
this.handleError = (event) => {
|
|
78
|
-
var _a, _b, _c;
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
var _a, _b, _c, _d, _e, _f;
|
|
79
|
+
try {
|
|
80
|
+
const message = (_a = event.message) !== null && _a !== void 0 ? _a : `core.ReconnectingWebSocket error (${JSON.stringify(event)})`;
|
|
81
|
+
(_c = (_b = this.eventHandlers).error) === null || _c === void 0 ? void 0 : _c.call(_b, new Error(message));
|
|
82
|
+
}
|
|
83
|
+
catch (_g) {
|
|
84
|
+
const message = (_d = event.message) !== null && _d !== void 0 ? _d : `core.ReconnectingWebSocket error (unable to stringify)`;
|
|
85
|
+
(_f = (_e = this.eventHandlers).error) === null || _f === void 0 ? void 0 : _f.call(_e, new Error(message));
|
|
86
|
+
}
|
|
81
87
|
};
|
|
82
88
|
this.socket = socket;
|
|
83
89
|
this.socket.addEventListener("open", this.handleOpen);
|
|
@@ -75,9 +75,15 @@ class ChatSocket {
|
|
|
75
75
|
(_b = (_a = this.eventHandlers).close) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
76
76
|
};
|
|
77
77
|
this.handleError = (event) => {
|
|
78
|
-
var _a, _b, _c;
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
var _a, _b, _c, _d, _e, _f;
|
|
79
|
+
try {
|
|
80
|
+
const message = (_a = event.message) !== null && _a !== void 0 ? _a : `core.ReconnectingWebSocket error (${JSON.stringify(event)})`;
|
|
81
|
+
(_c = (_b = this.eventHandlers).error) === null || _c === void 0 ? void 0 : _c.call(_b, new Error(message));
|
|
82
|
+
}
|
|
83
|
+
catch (_g) {
|
|
84
|
+
const message = (_d = event.message) !== null && _d !== void 0 ? _d : `core.ReconnectingWebSocket error (unable to stringify)`;
|
|
85
|
+
(_f = (_e = this.eventHandlers).error) === null || _f === void 0 ? void 0 : _f.call(_e, new Error(message));
|
|
86
|
+
}
|
|
81
87
|
};
|
|
82
88
|
this.socket = socket;
|
|
83
89
|
this.socket.addEventListener("open", this.handleOpen);
|