Sha256: 97f048e9ab9ede0724a24b4347a2cfbd921543fe3c2d0056eb2da62bd98e0545
Contents?: true
Size: 706 Bytes
Versions: 69
Compression:
Stored size: 706 Bytes
Contents
"use strict"; 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(); exports["default"] = Exception;
Version data entries
69 entries across 69 versions & 2 rubygems