silently fail when pixellog file doesn't exist

fix #76
This commit is contained in:
HF 2023-12-13 12:15:17 +01:00
parent 9c5596d86a
commit 18d9828b2b
1 changed files with 12 additions and 8 deletions

View File

@ -268,14 +268,18 @@ export async function executeImageAction(
* register responses on socket for Watch Actions
*/
socketEvents.onReq('watch', (action, ...args) => {
if (action === 'getIIDSummary') {
return getIIDSummary(...args);
} if (action === 'getIIDPixels') {
return getIIDPixels(...args);
} if (action === 'getSummaryFromArea') {
return getSummaryFromArea(...args);
} if (action === 'getPixelsFromArea') {
return getPixelsFromArea(...args);
try {
if (action === 'getIIDSummary') {
return getIIDSummary(...args);
} if (action === 'getIIDPixels') {
return getIIDPixels(...args);
} if (action === 'getSummaryFromArea') {
return getSummaryFromArea(...args);
} if (action === 'getPixelsFromArea') {
return getPixelsFromArea(...args);
}
} catch {
// silently fail when file couldn't be parsed
}
return null;
});