electron-main: Use camle-case for the send_error method.

This commit is contained in:
Damir Jelić 2019-11-08 13:45:06 +01:00
parent 71023ae9df
commit 94196eb11b
1 changed files with 8 additions and 8 deletions

View File

@ -155,7 +155,7 @@ autoUpdater.on('update-downloaded', (ev, releaseNotes, releaseName, releaseDate,
ipcMain.on('ipcCall', async function(ev, payload) { ipcMain.on('ipcCall', async function(ev, payload) {
if (!mainWindow) return; if (!mainWindow) return;
const send_error = (id, e) => { const sendError = (id, e) => {
const error = { const error = {
message: e.message message: e.message
} }
@ -226,7 +226,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
eventIndex = new seshat(p); eventIndex = new seshat(p);
console.log("Initialized event store"); console.log("Initialized event store");
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
} }
@ -245,7 +245,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
try { try {
eventIndex.addEvent(args[0], args[1]); eventIndex.addEvent(args[0], args[1]);
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
break; break;
@ -254,7 +254,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
try { try {
ret = await eventIndex.commit(); ret = await eventIndex.commit();
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
break; break;
@ -263,7 +263,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
try { try {
ret = await eventIndex.search(args[0]); ret = await eventIndex.search(args[0]);
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
break; break;
@ -275,7 +275,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
ret = await eventIndex.addHistoricEvents( ret = await eventIndex.addHistoricEvents(
args[0], args[1], args[2]); args[0], args[1], args[2]);
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
} }
@ -287,7 +287,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
try { try {
ret = await eventIndex.removeCrawlerCheckpoint(args[0]); ret = await eventIndex.removeCrawlerCheckpoint(args[0]);
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
} }
@ -299,7 +299,7 @@ ipcMain.on('ipcCall', async function(ev, payload) {
try { try {
ret = await eventIndex.addCrawlerCheckpoint(args[0]); ret = await eventIndex.addCrawlerCheckpoint(args[0]);
} catch (e) { } catch (e) {
send_error(payload.id, e); sendError(payload.id, e);
return; return;
} }
} }