Commit aa9ce739 authored by yann300's avatar yann300

add catch on buildTree

parent ffbd855c
...@@ -97,13 +97,17 @@ async function buildTree (tree, step, scopeId) { ...@@ -97,13 +97,17 @@ async function buildTree (tree, step, scopeId) {
return { outStep: step, error: 'InternalCallTree - No source Location. ' + step } return { outStep: step, error: 'InternalCallTree - No source Location. ' + step }
} }
if (sourceLocation.jump === 'i') { if (sourceLocation.jump === 'i') {
try {
var result = await buildTree(tree, step + 1, scopeId === '' ? subScope.toString() : scopeId + '.' + subScope) var result = await buildTree(tree, step + 1, scopeId === '' ? subScope.toString() : scopeId + '.' + subScope)
if (result.error) { if (result.error) {
return result return { outStep: step, error: 'InternalCallTree - ' + result.error }
} else { } else {
step = result.outStep step = result.outStep
subScope++ subScope++
} }
} catch (e) {
return { outStep: step, error: 'InternalCallTree - ' + e.message }
}
} else if (sourceLocation.jump === 'o') { } else if (sourceLocation.jump === 'o') {
tree.scopes[scopeId].lastStep = step tree.scopes[scopeId].lastStep = step
return { outStep: step + 1 } return { outStep: step + 1 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment