Skip to content

Commit

Permalink
Merge pull request #188 from HSLdevcom/error-tupla-viesti
Browse files Browse the repository at this point in the history
Let's solve this eternal problem by muting the python worker
  • Loading branch information
hsl-petrhaj authored Aug 22, 2023
2 parents 58ac16b + f49beb1 commit 644e99a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ ipcMain.on('loggable-event-from-worker', (event, args) => {
// utils.log
event_args = JSON.parse(event_string);
} catch (error) {
// numpy warnings
// numpy warnings and other non-log messages
event_args = {
"level": "EXCEPTION",
"message": event_string,
Expand All @@ -167,10 +167,10 @@ ipcMain.on('loggable-event-from-worker', (event, args) => {
mainWindow.webContents.send('loggable-event', event_args);
});

// Log worker-errors (by PythonShell, not stderr) in main console
ipcMain.on('process-error-from-worker', (event, args) => {
mainWindow.webContents.send('loggable-event', {
"level": "ERROR",
"message": (typeof args === "string") ? args : JSON.stringify(args)
});
});
// // Log worker-errors (by PythonShell, not stderr) in main console
// ipcMain.on('process-error-from-worker', (event, args) => {
// mainWindow.webContents.send('loggable-event', {
// "level": "ERROR",
// "message": (typeof args === "string") ? args : JSON.stringify(args)
// });
// });

0 comments on commit 644e99a

Please sign in to comment.