MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / onerror

Function onerror

map-chat/javascript/browserMqtt.js:3337–3342  ·  view source on GitHub ↗
(er)

Source from the content-addressed store, hash-verified

3335 // if the dest has an error, then stop piping into it.
3336 // however, don't suppress the throwing behavior for this.
3337 function onerror(er) {
3338 unpipe();
3339 dest.removeListener('error', onerror);
3340 if (EE.listenerCount(dest, 'error') === 0)
3341 dest.emit('error', er);
3342 }
3343 // This is a brutally ugly hack to make sure that our error handler
3344 // is attached before any userland ones. NEVER DO THIS.
3345 if (!dest._events || !dest._events.error)

Callers

nothing calls this directly

Calls 3

unpipeFunction · 0.85
cleanupFunction · 0.85
emitMethod · 0.80

Tested by

no test coverage detected