catch node extended

This commit is contained in:
NetHans
2022-08-14 20:28:34 +02:00
parent 08ce6cce97
commit 371253a4f6
4 changed files with 15 additions and 2 deletions

View File

@@ -734,11 +734,17 @@ class Flow {
} else {
var handledByUncaught = false;
const flow = this;
this.catchNodes.forEach(function(targetCatchNode) {
if (targetCatchNode.scope && targetCatchNode.scope.indexOf(reportingNode.id) === -1) {
if (Array.isArray(targetCatchNode.scope) && targetCatchNode.scope.indexOf(reportingNode.id) === -1) {
return;
}
if (!targetCatchNode.scope && targetCatchNode.uncaught && !handledByUncaught) {
if (targetCatchNode.scope === "group" && flow.isNodeInSameGroup(targetCatchNode, reportingNode) === false){
return;
}
if ((!targetCatchNode.scope || targetCatchNode.scope === "group") && targetCatchNode.uncaught && !handledByUncaught) {
if (handled) {
// This has been handled by a !uncaught catch node
return;