Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Internet Explorer for Mac > How to create J...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 130 of 192
Post > Topic >>

How to create JScript Error Object in IE for Mac OS X

by =?Utf-8?B?RGFnd2lu?= <Dagwin@[EMAIL PROTECTED] > Nov 8, 2004 at 03:18 AM

I need to throw an exception in JScript. According to the ECMA-262 
specification this is done as follows:

throw new Error("My error message!");

This works fine for IE on Windows but it doesn't on the Mac OS X
plattform. 
The JScript Engine insists that the Object Error is not known. As Error is

basic to the ECMA specification it should be available in all 
implementations. The funny thing is that the script engine obviously knows

about the Error Object as the following test shows:

try {
  eval("abc"); // This produces an error for sure!
} catch(error) {
  alert(error);
}

This produces a message box with "[object Error]" as content. Which
clearly 
shows that the inderictly thrown Exception is of type Error.

So the remaining question is:

If the engine can create Error objects if necessary, why can't my program 
using the new statement like "new Error(myMessage)".

If anyone could help on this I'd be really glad.

Thanks

Dagwin
 




 1 Posts in Topic:
How to create JScript Error Object in IE for Mac OS X
=?Utf-8?B?RGFnd2lu?= <  2004-11-08 03:18:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 2:50:45 CDT 2008.