2
0
mirror of https://github.com/esiur/esiur-js.git synced 2026-05-03 01:08:43 +00:00

error msg

This commit is contained in:
2024-02-06 17:36:58 +03:00
parent 757d949c18
commit 84bf9fa539
6 changed files with 1509 additions and 5494 deletions
+1
View File
@@ -1,3 +1,4 @@
node_modules/ node_modules/
.vscode/ .vscode/
test.js test.js
ignored/
+3 -3
View File
@@ -909,7 +909,7 @@ var AsyncException = /*#__PURE__*/function (_Error) {
this.type = type; this.type = type;
this.code = code; this.code = code;
if (type == 0) { if (type == 0 && message == null) {
for (var i in _ExceptionCode["default"]) { for (var i in _ExceptionCode["default"]) {
if (_ExceptionCode["default"][i] == code) { if (_ExceptionCode["default"][i] == code) {
this.message = i; this.message = i;
@@ -10738,9 +10738,9 @@ var WSocket = /*#__PURE__*/function (_ISocket) {
rt.trigger(true); rt.trigger(true);
}; };
ws.onerror = function () { ws.onerror = function (ee) {
self.state = _SocketState["default"].Closed; self.state = _SocketState["default"].Closed;
rt.triggerError(_ErrorType["default"].Management, _ExceptionCode["default"].HostNotReachable); rt.triggerError(_ErrorType["default"].Management, _ExceptionCode["default"].HostNotReachable, ee.message);
}; };
self._assign(ws); self._assign(ws);
+1500 -5486
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "esiur", "name": "esiur",
"version": "2.2.13", "version": "2.2.14",
"description": "Distributed Object Framework", "description": "Distributed Object Framework",
"main": "esiur.js", "main": "esiur.js",
"type": "module", "type": "module",
+1 -1
View File
@@ -50,7 +50,7 @@ export default class AsyncException extends Error
this.type = type; this.type = type;
this.code = code; this.code = code;
if (type == 0) if (type == 0 && message == null)
{ {
for(var i in ExceptionCode) for(var i in ExceptionCode)
if (ExceptionCode[i] == code) if (ExceptionCode[i] == code)
+2 -2
View File
@@ -106,9 +106,9 @@ export default class WSocket extends ISocket
rt.trigger(true); rt.trigger(true);
}; };
ws.onerror = () => { ws.onerror = (ee) => {
self.state = SocketState.Closed; self.state = SocketState.Closed;
rt.triggerError(ErrorType.Management, ExceptionCode.HostNotReachable); rt.triggerError(ErrorType.Management, ExceptionCode.HostNotReachable, ee.message);
}; };
self._assign(ws); self._assign(ws);