Skip to content

Commit d90dbd8

Browse files
committed
add better logging and exception handling for issues with windows arm build
1 parent c8f6fd5 commit d90dbd8

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "solidtime",
3-
"version": "0.0.55-beta",
3+
"version": "0.0.56-beta",
44
"description": "Desktop App for solidtime - the modern open-source time tracker",
55
"main": "./out/main/index.js",
66
"author": "solidtime.io",

src/main/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@ import * as Sentry from '@sentry/electron/main'
1919
import path from 'node:path'
2020
import { stopIdleMonitoring } from './idleMonitor'
2121

22+
// Global error handlers to capture full error details
23+
process.on('uncaughtException', (error) => {
24+
console.error('=== UNCAUGHT EXCEPTION ===')
25+
console.error('Error name:', error.name)
26+
console.error('Error message:', error.message)
27+
console.error('Error stack:', error.stack)
28+
console.error('Full error object:', JSON.stringify(error, Object.getOwnPropertyNames(error), 2))
29+
30+
// Show error dialog
31+
dialog.showErrorBox(
32+
'A JavaScript error occurred in the main process',
33+
`${error.name}: ${error.message}\n\nStack:\n${error.stack}`
34+
)
35+
})
36+
37+
process.on('unhandledRejection', (reason, promise) => {
38+
console.error('=== UNHANDLED REJECTION ===')
39+
console.error('Promise:', promise)
40+
console.error('Reason:', reason)
41+
if (reason instanceof Error) {
42+
console.error('Error stack:', reason.stack)
43+
}
44+
})
45+
2246
const gotTheLock = app.requestSingleInstanceLock()
2347
if (!gotTheLock) {
2448
app.quit()

0 commit comments

Comments
 (0)