Skip to content

Instantly share code, notes, and snippets.

@lxmfly123
Created July 31, 2017 23:50
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 lxmfly123/0121a563c142e642430957fc4f4308b0 to your computer and use it in GitHub Desktop.
Save lxmfly123/0121a563c142e642430957fc4f4308b0 to your computer and use it in GitHub Desktop.
Error Object
var err = new Error('A test message.');
err.hasOwnProperty('message'); // true
JSON.stringify(err); // {}
@lxmfly123
Copy link
Author

按说应该会返回一个至少包含 message 属性的 json 对象吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment