question on how map/reduces are handled ... if one...
# suitescript
d
question on how map/reduces are handled ... if one map (or a reduce) encounters a fatal error, will it kill the whole script?
n
Not sure what your definition of "fatal" is but in theory no. You should also be able to gather up all uncaught errors in the summarize stage.
d
SSS_STATEMENT_COUNT_EXCEEDED in this case. Also if you manually throw an error using N/error
n
Not sure if the statement count error is across the whole process or just that map instance, if the latter, you should be ok. Likewise, throwing an error is particular to that map instance. I'd you process 10 records, one per map instance and throw an error on the first it'll still proceed with the other records since they are not dependent on each other. Somewhat obviously if the dataset in reduce is running once, depending on if you catch the error the behaviour could be different. As an example if the output from map means you have an array to process in reduce and it fails iterating the array then it could potentially halt the process there and then, depends how you manage errors.