MCPcopy
hub / github.com/socketio/socket.io / onError

Function onError

packages/engine.io/lib/transport.ts:135–146  ·  view source on GitHub ↗

* Called with a transport error. * * @param {String} msg - message error * @param {Object} desc - error description * @protected

(msg: string, desc?)

Source from the content-addressed store, hash-verified

133 * @protected
134 */
135 protected onError(msg: string, desc?) {
136 if (this.listeners("error").length) {
137 const err = new Error(msg);
138 // @ts-ignore
139 err.type = "TransportError";
140 // @ts-ignore
141 err.description = desc;
142 this.emit("error", err);
143 } else {
144 debug("ignored transport error %s (%s)", msg, desc);
145 }
146 }
147
148 /**
149 * Called with parsed out a packets from the data stream.

Callers 2

onTransportCloseMethod · 0.70
onCloseMethod · 0.70

Calls 2

debugFunction · 0.85
emitMethod · 0.65

Tested by

no test coverage detected