Skip to content
Snippets Groups Projects
Commit 723a6a1f authored by Alexander Rose's avatar Alexander Rose
Browse files

gracefully handle errors when getting em map info

parent 51ac7594
No related branches found
No related tags found
No related merge requests found
......@@ -66,12 +66,23 @@ export const InitVolumeStreaming = StateAction.build({
const emdbIds = await getEmdbIds(plugin, taskCtx, dataId)
for (let j = 0, jl = emdbIds.length; j < jl; ++j) {
const emdbId = emdbIds[j]
const contourLevel = await getContourLevel(params.options.emContourProvider, plugin, taskCtx, emdbId)
let contourLevel: number | undefined;
try {
contourLevel = await getContourLevel(params.options.emContourProvider, plugin, taskCtx, emdbId)
} catch (e) {
console.info(`Could not get map info for ${emdbId}: ${e}`)
continue;
}
addEntry(entries, params.method, emdbId, contourLevel || 0)
}
continue;
}
emDefaultContourLevel = await getContourLevel(params.options.emContourProvider, plugin, taskCtx, dataId);
try {
emDefaultContourLevel = await getContourLevel(params.options.emContourProvider, plugin, taskCtx, dataId);
} catch (e) {
console.info(`Could not get map info for ${dataId}: ${e}`)
continue;
}
}
addEntry(entries, params.method, dataId, emDefaultContourLevel || 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment