bem-xjst
Version:
Declarative Template Engine for the browser and server
15 lines (11 loc) • 374 B
JavaScript
function BEMXJSTError(msg, func) {
this.name = 'BEMXJSTError';
this.message = msg;
if (Error.captureStackTrace)
Error.captureStackTrace(this, func || this.constructor);
else
this.stack = (new Error()).stack;
}
BEMXJSTError.prototype = Object.create(Error.prototype);
BEMXJSTError.prototype.constructor = BEMXJSTError;
exports.BEMXJSTError = BEMXJSTError;