another rivertrail question

Hudson, Rick rick.hudson at
Fri Apr 5 10:19:59 PDT 2013

(typeError instanceof Error) is true so an implementation is free to throw typeError.

It does not count as a side effect.

What happens when a kernel throws an exception is not covered in the strawman.

I suggest that an exception coming from within a kernel function will result in an exception being thrown from the high level ParallelArray method. If more than one kernel throws an exception the ParallelArray method is free to choose which one is thrown to its caller.

-        Rick

From: es-discuss-bounces at [mailto:es-discuss-bounces at] On Behalf Of Norm Rubin
Sent: Friday, April 05, 2013 8:54 AM
To: es-discuss at
Subject: another rivertrail question

In an elemental function  does throwing an error, count as a side effect?

For instance

V2 = new Array(10, function(){return 23} ,14)

V1 = ParallelArray(14,12,10) function(e,i)  { var temp = array[e-12] = v2[i].toFixed() ; ...  })

Since the toFixed will  throw a type error when i =1, and a range error when e = 10

If this is a side effect, then it is not an elemental function and should throw Error, not typeError or rangeError

This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list