Jump to content
Larry Ullman's Book Forums

Chapter 12 - Try Catch Example

Recommended Posts


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...