Skip to content

Commit

Permalink
feat: top level error catch (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau authored Jun 28, 2022
1 parent 7665009 commit a7afb4e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { readFileSync, writeFileSync } from 'fs-extra'
import * as Sentry from '@sentry/electron'
import { dialog } from 'electron'

import { openDashboardInBrowser, openInstallerInBrowser } from './browser'
import { runDownloader } from './downloader'
import { runElectronTray } from './electron'
import { runKeepAliveLoop, runLauncher } from './launcher'
import { findFreePort } from './port'
import { runServer } from './server'
import { getStatus } from './status'
import * as Sentry from '@sentry/electron'

import SENTRY from './.sentry.json'
import PACKAGE_JSON from '../package.json'
import { logger } from './logger'
import { readFileSync, writeFileSync } from 'fs-extra'
import { getPath } from './path'
import { ensureApiKey } from './api-key'

Expand Down Expand Up @@ -87,4 +88,6 @@ async function main() {
runKeepAliveLoop()
}

main()
main().catch(e => {
dialog.showErrorBox('There was an error in Swarm Desktop', e.message)
})

0 comments on commit a7afb4e

Please sign in to comment.