Obviously in console core modules(https://nodejs.org/dist/latest-v4.x/docs/api/console.html) of node documentation exist below code:
console.error(new Error('Whoops, something bad happened'));
// Prints: [Error: Whoops, something bad happened], to stderr
but,when I run test.js which code show below
var err = new Error('a');
console.error(err);
the terminal print the message like:
Error: a at Object. (/Users/suoyong/Express/连接数据库/error.js:1:73) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.runMain (module.js:590:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3
As you can see, my code is same with the node doc, and yet the result not. Please help me with the tiny question.,