Skip to content

Commit

Permalink
Hotfix: Handle errors by logging them in the terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Jun 22, 2019
1 parent b07de1d commit 20a4e38
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/FavoriteTracksView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const EmptyState = () => {
<div className={styles.empty_state} >
<Icon name='star'/>
<h2>{t('empty')}</h2>
<div>{t('empty-extra')}</div>
<div>{t('empty-help')}</div>
</div>
);
};
Expand Down
9 changes: 8 additions & 1 deletion server/main.prod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
require('babel-polyfill');
import 'babel-polyfill';
import process from 'process';
import logger from 'electron-timber';

const { app, ipcMain, nativeImage, BrowserWindow, Menu, Tray } = require('electron');
const platform = require('electron-platform');
const path = require('path');
Expand All @@ -12,6 +15,10 @@ let win;
let tray;
let icon = nativeImage.createFromPath(path.resolve(__dirname, 'resources', 'media', 'icon.png'));

process.on('uncaughtException', error => {
logger.log(error);
});

function changeWindowTitle(artist, title) {
win.setTitle(`${artist} - ${title} - Nuclear Music Player`);
}
Expand Down
8 changes: 7 additions & 1 deletion server/main.prod.linux.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require('babel-polyfill');
import 'babel-polyfill';
import process from 'process';
import logger from 'electron-timber';
const { app, ipcMain, nativeImage, BrowserWindow, Menu, Tray } = require('electron');
const platform = require('electron-platform');
const path = require('path');
Expand All @@ -17,6 +19,10 @@ let icon = nativeImage.createFromPath(path.resolve(__dirname, 'resources', 'medi
// win.setTitle(`${artist} - ${title} - nuclear music player`);
// }

process.on('uncaughtException', error => {
logger.log(error);
});

function createWindow() {
win = new BrowserWindow({
width: 1366,
Expand Down

0 comments on commit 20a4e38

Please sign in to comment.