Jump to content
Larry Ullman's Book Forums

Chapter 12 - Try Catch Example


Recommended Posts

Hello,

I have been testing code on page 478 step 2 and don't understand why there is "error.message" instead of "ex.message"?

try {

     ajax = new ActiveXObject('MSXML2.XMLHTTP.3.0');
} catch (ex) {

console.log('Could not create the ActiveXObject: ' + error.message + '\n');
}

Maybe the answer is simple but it bothers me a lot :)
Could anyone help me understand it, please?

Regards, T

Link to comment
Share on other sites

 Share

×
×
  • Create New...