MCPcopy Create free account
hub / github.com/TruthHun/BookStack / onerror

Function onerror

static/word2md/mammoth.browser.js:24715–24720  ·  view source on GitHub ↗
(er)

Source from the content-addressed store, hash-verified

24713 // if the dest has an error, then stop piping into it.
24714 // however, don't suppress the throwing behavior for this.
24715 function onerror(er) {
24716 debug('onerror', er);
24717 unpipe();
24718 dest.removeListener('error', onerror);
24719 if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
24720 }
24721
24722 // Make sure our error handler is attached before userland ones.
24723 prependListener(dest, 'error', onerror);

Callers

nothing calls this directly

Calls 3

EElistenerCountFunction · 0.85
unpipeFunction · 0.70
cleanupFunction · 0.70

Tested by

no test coverage detected