When I try the following in the chrome console, i get ‘undefined’ as the value of ‘e’:
try{
var test=somethingInvalid();
}
catch(e){
console.log(e);
}
How do I access the details of e?
What properties does it have?
Thanks.
Doh. Doing console.log(‘E is: ‘+e) seams to work. Sorry!
Well, it will return
undefined, because the last lineconsole.logdoesn’t return a value.but with the above you will also see an object
> Reference Errorfollowed by the next line ofundefined