Michael Scott
09/21/2021, 9:33 PMCraig
09/21/2021, 9:34 PMMichael Scott
09/21/2021, 9:35 PMMichael Scott
09/21/2021, 9:35 PMCraig
09/21/2021, 9:35 PMMichael Scott
09/21/2021, 9:35 PMMichael Scott
09/21/2021, 9:46 PMCraig
09/21/2021, 10:13 PMMichael Scott
09/21/2021, 10:13 PMMichael Scott
09/21/2021, 10:13 PMCraig
09/21/2021, 10:16 PMCraig
09/21/2021, 10:16 PMCraig
09/21/2021, 10:17 PMCraig
09/21/2021, 10:17 PMMichael Scott
09/21/2021, 10:17 PMMichael Scott
09/21/2021, 10:17 PMMichael Scott
09/21/2021, 11:06 PMMichael Scott
09/21/2021, 11:06 PMMichael Scott
09/21/2021, 11:07 PMMichael Scott
09/21/2021, 11:07 PMMichael Scott
09/21/2021, 11:07 PMMichael Scott
09/21/2021, 11:08 PMMichael Scott
09/21/2021, 11:08 PMlog.error("map","my error")
Michael Scott
09/21/2021, 11:08 PMMichael Scott
09/21/2021, 11:10 PMcontext.mapSummary.errors.iterator().each(function {key, error} { log.error("my key" + key, error); return true; });
Michael Scott
09/21/2021, 11:10 PMMichael Scott
09/21/2021, 11:10 PMbattk
09/21/2021, 11:11 PMmapSummary.errors
is for thrown errorsMichael Scott
09/21/2021, 11:11 PMMichael Scott
09/21/2021, 11:11 PMbattk
09/21/2021, 11:12 PMbattk
09/21/2021, 11:12 PMMichael Scott
09/21/2021, 11:13 PMMichael Scott
09/21/2021, 11:13 PMMichael Scott
09/21/2021, 11:16 PMMichael Scott
09/21/2021, 11:16 PMbattk
09/21/2021, 11:16 PMMichael Scott
09/21/2021, 11:17 PMMichael Scott
09/21/2021, 11:17 PMMichael Scott
09/21/2021, 11:17 PMMichael Scott
09/21/2021, 11:17 PMbattk
09/21/2021, 11:18 PMbattk
09/21/2021, 11:18 PMMichael Scott
09/21/2021, 11:19 PMerror.create({ name: "MY_ERROR_CODE", message: "my message", notifyOff: true });
battk
09/21/2021, 11:20 PMMichael Scott
09/21/2021, 11:21 PMMichael Scott
09/21/2021, 11:21 PMMichael Scott
09/21/2021, 11:22 PMbattk
09/21/2021, 11:24 PMbattk
09/21/2021, 11:25 PMMichael Scott
09/21/2021, 11:25 PMbattk
09/21/2021, 11:25 PMMichael Scott
09/21/2021, 11:26 PMbattk
09/21/2021, 11:26 PMMichael Scott
09/21/2021, 11:27 PMlog.error("my error","value") or throw "my error"
Michael Scott
09/21/2021, 11:27 PMMichael Scott
09/21/2021, 11:27 PMbattk
09/21/2021, 11:28 PMMichael Scott
09/21/2021, 11:28 PMMichael Scott
09/21/2021, 11:28 PMfunction map(context) {
const tranId = context.key;
const tran = JSON.parse(context.value).values;
log.error("map", "test");
context.write(tranId, context.value);
}
battk
09/21/2021, 11:29 PMbattk
09/21/2021, 11:29 PMMichael Scott
09/21/2021, 11:29 PMMichael Scott
09/21/2021, 11:29 PMMichael Scott
09/21/2021, 11:29 PMMichael Scott
09/21/2021, 11:29 PMMichael Scott
09/21/2021, 11:29 PMMichael Scott
09/21/2021, 11:30 PMbattk
09/21/2021, 11:32 PMMichael Scott
09/21/2021, 11:35 PMMichael Scott
09/21/2021, 11:35 PMfunction map(context) {
const tranId = context.key;
const tran = JSON.parse(context.value).values;
throw "this is my error"
context.write(tranId, context.value);
}
Michael Scott
09/21/2021, 11:36 PMMichael Scott
09/21/2021, 11:36 PMfunction summarize(context) {
log.audit("summarize", "entered");
if (context.inputSummary.error) {
log.error("Input Error", context.inputSummary.error);
}
context.mapSummary.errors.iterator().each(function (key, error) {
log.error("Map Error for key: " + key, error);
return true;
});
context.reduceSummary.errors.iterator().each(function (key, error) {
log.error("Reduce Error for key: " + key, error);
return true;
});
}
battk
09/21/2021, 11:37 PMthrow "this is my error"
battk
09/21/2021, 11:37 PMbattk
09/21/2021, 11:37 PMMichael Scott
09/21/2021, 11:37 PMMichael Scott
09/21/2021, 11:38 PMMichael Scott
09/21/2021, 11:38 PMMichael Scott
09/21/2021, 11:39 PMMichael Scott
09/21/2021, 11:39 PMbattk
09/21/2021, 11:40 PMMichael Scott
09/21/2021, 11:41 PMbattk
09/21/2021, 11:42 PMbattk
09/21/2021, 11:42 PMbattk
09/21/2021, 11:43 PMMichael Scott
09/21/2021, 11:44 PMMichael Scott
09/21/2021, 11:45 PMbattk
09/21/2021, 11:46 PMbattk
09/21/2021, 11:46 PMMichael Scott
09/21/2021, 11:47 PMMichael Scott
09/21/2021, 11:47 PMMichael Scott
09/21/2021, 11:48 PMMichael Scott
09/21/2021, 11:49 PMbattk
09/21/2021, 11:49 PMMichael Scott
09/21/2021, 11:49 PMMichael Scott
09/21/2021, 11:50 PMMichael Scott
09/21/2021, 11:50 PMbattk
09/21/2021, 11:50 PMMichael Scott
09/21/2021, 11:50 PMMichael Scott
09/21/2021, 11:50 PMMichael Scott
09/21/2021, 11:50 PMbattk
09/21/2021, 11:51 PMMichael Scott
09/21/2021, 11:51 PMMichael Scott
09/21/2021, 11:51 PMMichael Scott
09/21/2021, 11:52 PMbattk
09/21/2021, 11:52 PMbattk
09/21/2021, 11:53 PMMichael Scott
09/21/2021, 11:53 PMMichael Scott
09/21/2021, 11:54 PMMichael Scott
09/21/2021, 11:54 PMMichael Scott
09/21/2021, 11:55 PMbattk
09/22/2021, 12:00 AMMichael Scott
09/22/2021, 12:00 AMbattk
09/22/2021, 12:00 AMMichael Scott
09/22/2021, 12:00 AMMichael Scott
09/22/2021, 12:00 AMstalbert
09/22/2021, 5:06 AM