Skip to content

Instantly share code, notes, and snippets.

@addaleax
Created January 18, 2017 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save addaleax/cd3d3e5a6c7d752eaa1d15396e80608e to your computer and use it in GitHub Desktop.
Save addaleax/cd3d3e5a6c7d752eaa1d15396e80608e to your computer and use it in GitHub Desktop.
grep -R 'new [A-Za-z]*Error' lib|grep '`'
lib/dns.js: ex = new Error(`${syscall} ${err}${errHost}`);
lib/dns.js: throw new TypeError(`"port" should be >= 0 and < 65536, got "${port}"`);
lib/dns.js: throw new Error(`Unknown type "${type_}"`);
lib/dns.js: throw new Error(`IP address is not properly formatted: ${serv}`);
lib/dns.js: throw new Error(`c-ares failed to set servers: "${err}" [${servers}]`);
lib/_http_server.js: throw new RangeError(`Invalid status code: ${statusCode}`);
lib/string_decoder.js: throw new Error(`Unknown encoding: ${enc}`);
lib/internal/process.js: throw new Error(`Unknown signal: ${sig}`);
lib/internal/buffer.js: const err = new Error(`Unable to transcode Buffer [${code}]`);
lib/internal/repl.js: new Error(`Could not parse history data in ${oldHistoryPath}.`));
lib/internal/fs.js: throw new Error(`Unknown encoding: ${encoding}`);
lib/internal/bootstrap_node.js: throw new Error(`No such native module ${id}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment