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

Function subError

static/word2md/mammoth.browser.js:5663–5677  ·  view source on GitHub ↗
(nameProperty, defaultMessage)

Source from the content-addressed store, hash-verified

5661var notEnumerableProp = util.notEnumerableProp;
5662
5663function subError(nameProperty, defaultMessage) {
5664 function SubError(message) {
5665 if (!(this instanceof SubError)) return new SubError(message);
5666 notEnumerableProp(this, "message",
5667 typeof message === "string" ? message : defaultMessage);
5668 notEnumerableProp(this, "name", nameProperty);
5669 if (Error.captureStackTrace) {
5670 Error.captureStackTrace(this, this.constructor);
5671 } else {
5672 Error.call(this);
5673 }
5674 }
5675 inherits(SubError, Error);
5676 return SubError;
5677}
5678
5679var _TypeError, _RangeError;
5680var Warning = subError("Warning", "warning");

Callers 1

mammoth.browser.jsFile · 0.70

Calls 1

inheritsFunction · 0.70

Tested by

no test coverage detected