Sha256: 125fb7c18f8ca318a94ee4c5cd1effd670655402a63021445059a2d8896d1da2
Contents?: true
Size: 687 Bytes
Versions: 69
Compression:
Stored size: 687 Bytes
Contents
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; function Exception(message, node) { var line; if (node && node.firstLine) { line = node.firstLine; message += ' - ' + line + ':' + node.firstColumn; } var tmp = Error.prototype.constructor.call(this, message); // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. for (var idx = 0; idx < errorProps.length; idx++) { this[errorProps[idx]] = tmp[errorProps[idx]]; } if (line) { this.lineNumber = line; this.column = node.firstColumn; } } Exception.prototype = new Error(); export default Exception;
Version data entries
69 entries across 69 versions & 2 rubygems