Skip to content

Commit

Permalink
Merge pull request #406 from mitchhentges/405-hoxy-error-handling
Browse files Browse the repository at this point in the history
Ignores all fatal errors in main process
  • Loading branch information
mitchhentges authored Jan 5, 2019
2 parents 60f6cbe + 97993f4 commit c2943d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.1.2

#### Bugfixes

- Ignores `hoxy` errors (mitigates a cause of crashes)

# 2.1.1

#### Bugfixes
Expand Down
6 changes: 6 additions & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as process from 'process';
import {app, BrowserWindow, ipcMain as ipc} from 'electron';
import localShortcut from 'electron-localshortcut';
import browserLauncher from '@james-proxy/james-browser-launcher';
Expand All @@ -23,6 +24,11 @@ const urlMapper = createUrlMapper({
autoload: true
});

process.on('uncaughtException', (error) => {
// TODO remove this global handler!
console.warn('Ignored fatal error!', error); // eslint-disable-line no-console
});

console.log('Starting proxy...'); // eslint-disable-line no-console
const proxy = createProxy(config, urlMapper.urlMapper);

Expand Down

0 comments on commit c2943d1

Please sign in to comment.