I've looked around and have failed to find an answer to this.
What I am trying to do is print all the properties available in an Error object for error reporting. It may be impossible, but I would at least like to know why.
I have tried the following in Chrome and Firefox on Ubuntu 12.04.
try {
throw new Error('Foo');
} catch (x) {
console.log(Object.keys(x)); // []
for (var i in x) console.log(i); // Prints nothing
}
console.dir(x);to see what's inside (mostly the stack function) ?