mirror of
https://github.com/esiur/esiur-js.git
synced 2026-03-18 15:30:38 +00:00
error msg
This commit is contained in:
@@ -50,7 +50,7 @@ export default class AsyncException extends Error
|
||||
this.type = type;
|
||||
this.code = code;
|
||||
|
||||
if (type == 0)
|
||||
if (type == 0 && message == null)
|
||||
{
|
||||
for(var i in ExceptionCode)
|
||||
if (ExceptionCode[i] == code)
|
||||
|
||||
@@ -106,9 +106,9 @@ export default class WSocket extends ISocket
|
||||
rt.trigger(true);
|
||||
};
|
||||
|
||||
ws.onerror = () => {
|
||||
ws.onerror = (ee) => {
|
||||
self.state = SocketState.Closed;
|
||||
rt.triggerError(ErrorType.Management, ExceptionCode.HostNotReachable);
|
||||
rt.triggerError(ErrorType.Management, ExceptionCode.HostNotReachable, ee.message);
|
||||
};
|
||||
|
||||
self._assign(ws);
|
||||
|
||||
Reference in New Issue
Block a user