let a = null;
try {
a = yield context.df.callActivityWithRetry("Some1Activity", retryOptions, obj);
}
catch(error){
context.log(JSON.stringify(error));
yield context.df.callActivityWithRetry("Some2Activity", retryOptions, obj2);
throw new Error(error);
}
我的问题是发生错误时,Some2Activity
不会被执行。虽然它在文档中提到。
我什至试过这个
let a = null;
let errorObj = null;
try {
a = yield context.df.callActivityWithRetry("Some1Activity", retryOptions, obj);
}
catch(error){
context.log(JSON.stringify(error));
errorObj = error;
}
if(errorObj !== null) {
yield context.df.callActivityWithRetry("Some2Activity", retryOptions, obj2);
throw new Error(error);
}
它不起作用。我在这里做错了什么?